drop leading/trailing empty line in <pre>