I guess if we really wanted, we could convert newlines to spaces, that would solve it, right!?!
The real problem is that the file is processed a line at a time. It would be pretty easy, if necessary, to make it instead read the whole file into a string and process that.