emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] No newline at end of exported HTML file [9.6.6 (release_9.6.6


From: YE
Subject: Re: [BUG] No newline at end of exported HTML file [9.6.6 (release_9.6.6 @ /Applications/MacPorts/Emacs.app/Contents/Resources/lisp/org/)]
Date: Sun, 08 Oct 2023 22:40:56 +0300

>
>> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]