ox-md.el: Fix adding blank lines between table rows in derived exporters

* lisp/ox-md.el (org-md-separate-elements): Do not add blank lines
between table cells.  Even though table-cell elements are not exported
by ox-md itself, derived backends do not expect blank lines appearing
there.

Reported-by: Rohit Patnaik <quanticle@quanticle.net>
Link: https://orgmode.org/list/d84d5df0-108f-4a75-b7d2-299392613052@app.fastmail.com
This commit is contained in:
Ihor Radchenko 2024-02-18 17:25:27 +01:00
parent bc0e14a1ab
commit 85aafac417
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 7 additions and 3 deletions

View File

@ -152,8 +152,8 @@ headings for its own use."
TREE is the parse tree being exported. BACKEND is the export
back-end used. INFO is a plist used as a communication channel.
Enforce a blank line between elements. There are two exceptions
to this rule:
Enforce a blank line between elements. There are exceptions to this
rule:
1. Preserve blank lines between sibling items in a plain list,
@ -161,8 +161,12 @@ to this rule:
paragraph and the next sub-list when the latter ends the
current item.
3. Do not add blank lines after table rows. (This is irrelevant for
md exporter, but may surprise derived backends).
Assume BACKEND is `md'."
(org-element-map tree (remq 'item org-element-all-elements)
(org-element-map tree
(remq 'table-row (remq 'item org-element-all-elements))
(lambda (e)
(org-element-put-property
e :post-blank