ox-md: Fix blank lines insertion in sub-lists

* lisp/ox-md.el (org-md-separate-elements): In a list, when a sub-list
  is followed by another element, make sure it is surrounded by blank
  lines.

Reported-by: dbitouze@wanadoo.fr (Denis Bitouzé)
<http://permalink.gmane.org/gmane.emacs.orgmode/101113>
This commit is contained in:
Nicolas Goaziou 2015-09-22 21:32:07 +02:00
parent 304e5d33f5
commit 3e1bccc4a5
1 changed files with 4 additions and 3 deletions

View File

@ -116,9 +116,10 @@ Assume BACKEND is `md'."
e :post-blank
(if (and (eq (org-element-type e) 'paragraph)
(eq (org-element-type (org-element-property :parent e)) 'item)
(eq (org-element-type (org-export-get-next-element e info))
'plain-list)
(not (org-export-get-previous-element e info)))
(not (org-export-get-previous-element e info))
(let ((next (org-export-get-next-element e info)))
(and (eq (org-element-type next) 'plain-list)
(not (org-export-get-next-element next info)))))
0
1))))
;; Return updated tree.