Export supports any list ender. Export to ascii has been fixed.

* org-exp.el (org-export-mark-list-ending): Differentiate between
  export backends, and replace `org-list-end-re' by a blank line upon
  exporting.
This commit is contained in:
Nicolas Goaziou 2010-07-13 13:48:56 +02:00
parent 4c2bc51c52
commit fe42a5e83e
1 changed files with 19 additions and 8 deletions

View File

@ -1633,14 +1633,25 @@ These special cookies will later be interpreted by the backend."
"Mark list endings with special cookies. "Mark list endings with special cookies.
These special cookies will later be interpreted by the backend. These special cookies will later be interpreted by the backend.
`org-list-end-re' is replaced by a blank line in the process." `org-list-end-re' is replaced by a blank line in the process."
;; Backends using `org-list-parse-list' do not need this. (let ((process-buffer
(unless (eq backend 'latex) (lambda (end-list-marker)
(goto-char (point-min)) (goto-char (point-min))
(while (org-search-forward-unenclosed (org-item-re) nil 'move) (while (org-search-forward-unenclosed (org-item-re) nil t)
(goto-char (org-list-bottom-point)) (goto-char (org-list-bottom-point))
(when (looking-at (org-list-end-re)) (when (looking-at (org-list-end-re))
(replace-match "\n")) (replace-match "\n"))
(insert "ORG-LIST-END\n")))) (insert end-list-marker)))))
;; We need to divide backends into 3 categories.
(cond
;; 1. Backends using `org-list-parse-list' do not need markers.
((memq backend '(latex))
nil)
;; 2. Line-processing backends need to be told where lists end.
((memq backend '(html docbook))
(funcall process-buffer "ORG-LIST-END\n"))
;; 3. Others backends do not need to know this: clean list enders.
(t
(funcall process-buffer "\n")))))
(defun org-export-attach-captions-and-attributes (backend target-alist) (defun org-export-attach-captions-and-attributes (backend target-alist)
"Move #+CAPTION, #+ATTR_BACKEND, and #+LABEL text into text properties. "Move #+CAPTION, #+ATTR_BACKEND, and #+LABEL text into text properties.