mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-26 19:32:53 +00:00
HTML export: Respect example indentation when parsing plain lists
Examples and source code blocks that are not sufficiently indented will now terminate plain lists.
This commit is contained in:
parent
574f987670
commit
75117098f0
|
@ -1,5 +1,9 @@
|
|||
2009-06-07 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-html.el (org-export-html-close-lists-maybe): New function.
|
||||
(org-export-as-html): Close lists when original indentation
|
||||
mandates it.
|
||||
|
||||
* org-list.el (org-list-end): Respect the stored "original"
|
||||
indentation when determining the end of the list.
|
||||
|
||||
|
|
|
@ -841,6 +841,7 @@ lang=\"%s\" xml:lang=\"%s\">
|
|||
|
||||
;; Protected HTML
|
||||
(when (get-text-property 0 'org-protected line)
|
||||
(org-export-html-close-lists-maybe line)
|
||||
(let (par)
|
||||
(when (re-search-backward
|
||||
"\\(<p>\\)\\([ \t\r\n]*\\)\\=" (- (point) 100) t)
|
||||
|
@ -1865,6 +1866,22 @@ If there are links in the string, don't modify these."
|
|||
(org-close-par-maybe)
|
||||
(insert (if (equal type "d") "</dd>\n" "</li>\n")))
|
||||
|
||||
(defvar in-local-list)
|
||||
(defvar local-list-indent)
|
||||
(defun org-export-html-close-lists-maybe (line)
|
||||
(let ((ind (get-text-property 0 'original-indentation line))
|
||||
didclose)
|
||||
(when ind
|
||||
(while (and in-local-list
|
||||
(or (= ind (car local-list-indent))
|
||||
(< ind (car local-list-indent))))
|
||||
(setq didclose t)
|
||||
(org-close-li (car local-list-type))
|
||||
(insert (format "</%sl>\n" (car local-list-type)))
|
||||
(pop local-list-type) (pop local-list-indent)
|
||||
(setq in-local-list local-list-indent))
|
||||
(and didclose (org-open-par)))))
|
||||
|
||||
(defvar body-only) ; dynamically scoped into this.
|
||||
(defun org-html-level-start (level title umax with-toc head-count)
|
||||
"Insert a new level in HTML export.
|
||||
|
|
Loading…
Reference in a new issue