Browse Source

Insert a newline character before <\li> when exporting lists

* lisp/org-html.el (org-html-export-list-line): insert a newline
  character before ending an item, as anchor could be on a line
  going to be deleted, like a drawer ending string.
* lisp/org-list.el (org-list-to-html): same.
Nicolas Goaziou 14 years ago
parent
commit
b43ad47ad1
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lisp/org-html.el
  2. 1 1
      lisp/org-list.el

+ 1 - 1
lisp/org-html.el

@@ -2427,7 +2427,7 @@ the alist of previous items."
 	      ;; Ending for every item
 	      (org-close-li type)
 	      ;; We're ending last item of the list: end list.
-	      (when lastp (insert (format "</%sl>\n" type)))))
+	      (when lastp (insert (format "\n</%sl>\n" type)))))
 	  (funcall get-closings pos))
     (cond
      ;; At an item: insert appropriate tags in export buffer.

+ 1 - 1
lisp/org-list.el

@@ -2942,7 +2942,7 @@ with overruling parameters for `org-list-to-generic'."
 	       :dstart "<dl>" :dend "</dl>"
 	       :dtstart "<dt>" :dtend "</dt>\n"
 	       :ddstart "<dd>" :ddend "</dd>"
-	       :istart "<li>" :iend "</li>"
+	       :istart "<li>" :iend "\n</li>"
 	       :icount (format "<li value=\"%s\">" counter)
 	       :isep "\n" :lsep "\n" :csep "\n"
 	       :cbon "<code>[X]</code>" :cboff "<code>[ ]</code>")