Max Nikulin writes: >> I have no clue about the rationale of this special behaviour - it dates >> back to the days when Org export was merged. It is also not documented >> anywhere, AFAIK. > > I would not expect that the space after the following export snippet is > ignored in the case of ox-html or ox-latex backend: > > A space@@ascii:*@@ character. > > The space may be put inside the export snippet if the intention is to > omit it for output formats other than plain text. So current behavior is > perfectly reasonable and flexible enough. 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 am attaching tentative patch that will duplicate the logic for export snippets as well. And for any other object where transcoder returns nil. WDYT?