emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Trailing whitespace after export snippets without a transcoder


From: Ihor Radchenko
Subject: Re: Trailing whitespace after export snippets without a transcoder
Date: Sun, 19 May 2024 10:04:50 +0000

Ihor Radchenko <yantar92@posteo.net> writes:

>> I consider that just newlines are enough to make HTML markup human 
>> readable. I believe blank lines appear in HTML due to conditional 
>> constructs interpreted by various template engines and almost nobody 
>> cares concerning actual formatting in such cases.
>
> I looked further, and it turns out that Org export is already overriding
> the blank lines produced by the exporters.
> ...
> For now, we only override newlines between elements, not objects.
> For objects (but not plain-text), we unconditionally append :post-blank.
>
> I conclude that it is actually OK to go a step further and cleanup
> newlines after objects, before appending the post-blank.
>
> Same for plain-text.

Not so easy, unfortunately. Cleaning up spaces (in various degrees)
always leads to cascades of failed tests.

I did not find a good way to cleanup blank lines between objects without
overriding custom export filters or presenting these filters with
inaccurate information.

So, I went with the approach modifying individual export backends for now.

Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=14848726a
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6d5fa8198

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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