On 18/10/2022 11:39, Ihor Radchenko wrote:
Max Nikulin writes:
Selectively adding some workaround require complete reimplementation of
exporters. I have some curiosity concerning pandoc approach, but I am
unsure if I will reserve some time to read its code.
Maybe or maybe not. We have org-export-get-next-element and a number of
exporters doing something special for the first/last object inside a
container.
I have an impression that markup generated by children often added using
%s to some other construct. I may be wrong.
An idea how to avoid complete redesign: at first add something like
%__ORG_PROTECT_NEWLINE__
after each \\, later at an optimizing pass remove the comment if next
line does not start from a star or a square bracket, otherwise use some
workaround, e.g. "{[}". \relax may be suitable as well (in the beginning
of rows, not after \\).
I am not sure if it is a good idea. It may interfere with export filters.
I do not expect negative effect from a comment added at the end of line.
Optimizing pass may be performed prior to user filters.
As another approach text properties may be used as a communication
channel unless they are stripped by ox.