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: Max Nikulin
Subject: Re: Trailing whitespace after export snippets without a transcoder
Date: Mon, 22 Apr 2024 17:45:44 +0700
User-agent: Mozilla Thunderbird

On 21/04/2024 20:00, Ihor Radchenko wrote:
Max Nikulin writes:
      A space@@ascii:*@@ character.

Hmm. We actually have a similar scenario in `org-export--prune-tree'
with a slightly different logic - only keep spaces when previous object
does not have any.

I like this idea. At first I even believed that backend-specific code would not be necessary.

I do not think that we need to handle this Org mode-wide (it will be
difficult and will likely cause breaking changes).

I have not figured out why it may become a breaking changes and what backends need blank lines inside paragraph. I would make stripping empty lines default behavior with some option to disable this feature.

See the attached tentative fix.

Since zero width spaces are part of Org syntax, they need special treatment.

---- 8< ----
#+macro: empty (eval "")

Some *bold*​@@comment: *@@ text.
@@comment: line@@
More /italic/​{{{empty}}} text.
{{{empty}}}
Last line.
---- >8 ----

LaTeX export:
---- 8< ----
Some \textbf{bold}​text.
More \emph{italic}​ text.

Last line.
---- >8 ----

Notice visible space character disappeared after "bold". I am leaving up to you to decide if empty line appeared due to a macro is a bug or a feature. If I remember it correctly, your opinion is that a macro expanding to multiple paragraphs is a valid one.





reply via email to

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