> >> Exporting HTML file from Org-mode, f.i. with `org-html-export-to-html', >> I expect to get a newline after the closing </html> tag, but it's not >> added. I believe this used to work with previous versions of Org-mode. >> Am I missing something? > > `org-html-template' never ever had a newline at the end of the generated > html file.
Yes, I see that. It looks like there was something else that resulted in a newline added at the end of the exported, including published, HTML files (in previous Emacs versions). > May you please explain why missing newline is a problem? It's not necessarily a problem, since HTML parser implementations are permissive. Still, a couple of arguments for adding it by default: 1. diff tools output "\ No newline at end of file" message when a newline is missing. Supposedly, it's not optimal for default behavior. 2. POSIX.1-2017 states: "3.206 Line A sequence of zero or more non- <newline> characters plus a terminating <newline> character." 3. Ending a line of text with a particular identifier is rather a canonical approach.