Max Nikulin <maniku...@gmail.com> writes: >>>>>> +#+begin_src org >>>>>> +The following line may become a patagraph separator. >>>>>> +@@comment: might give unexpected effect @@ >>>>>> +Put some text before @@comment: a better variant >>>>>> +@@ and after instread. >>>>>> +#+end_src >> >> I am no longer able to reproduce the problem with @@comment:...@@ >> splitting paragraph in the above example. > > I see no changes in respect to ox-md on the main branch.
Right. Upon debugging further, to my great surprise, I found the following comment in ox.el: ;; Export snippets never return a nil value so ;; that white spaces following them are never ;; ignored. (and (eq type 'export-snippet) "") and then even a test: ;; Ignored export snippets do not remove any blank. (should (equal "begin end\n" (org-test-with-parsed-data "begin @@test:A@@ end" (org-export-data-with-backend tree (org-export-create-backend :transcoders '((paragraph . (lambda (paragraph contents info) contents)) (section . (lambda (section contents info) contents)))) info)))) The test was added in the commit https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a6d9fd82e Back-end developers should pay attention to the fact that white spaces before and after an ignored export snippet now are accumulated in the output. 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. -- 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>