In most cases, TeX does not distinguish between spaces and newlines. However, inside some macros and environments this distinction matters a lot. Time for a big list? Please edit the CW answer.
This occurred when pondering about Forward-inverse search using SyncTeX with the precison of a single word; this "expert knowledge" is however also relevant for any tool that tries to preprocess (La)TeX code, such as