summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-09-22 21:32:07 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-09-22 21:32:07 +0200
commit3e1bccc4a5206c2e61c41959174c76e9ba55c093 (patch)
tree3f154f8e0ad7d053049af2d9d48e2f4a3d7508d4
parent304e5d33f529772a1b8d3db033f6666ea4ba474d (diff)
downloadorg-mode-3e1bccc4a5206c2e61c41959174c76e9ba55c093.tar.gz
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>
-rw-r--r--lisp/ox-md.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index 919f296..989f8bf 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -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.