This won't necessarily preserve exact formatting (for example, if there ...

...are multiple blank lines in a row), but seems standard way to do it and maybe sufficient?