diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-01-18 22:36:49 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-02-18 12:45:11 +0100 |
commit | 4636453e93ded40507205faa5b2607f9493e5ed2 (patch) | |
tree | f6bf533225304ed89d08c8864192b118e800f8da | |
parent | 212828c556acfef3ec95257a4baafe38db8a3554 (diff) | |
download | org-mode-4636453e93ded40507205faa5b2607f9493e5ed2.tar.gz |
Do not enforce type of ordered lists upon exporting
* lisp/org-docbook.el (org-export-docbook-list-line): even with
alphabetical lists, Org shouldn't enforce a particular list type to
exporters. This is a job for style files.
* lisp/org-html.el (org-html-export-list-line): ib idem.
-rw-r--r-- | lisp/org-docbook.el | 18 | ||||
-rw-r--r-- | lisp/org-html.el | 18 |
2 files changed, 7 insertions, 29 deletions
diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el index f2518cd..256bafe 100644 --- a/lisp/org-docbook.el +++ b/lisp/org-docbook.el @@ -1391,27 +1391,17 @@ the alist of previous items." ;; case list is ill-formed. (type (funcall get-type list-beg struct prevs)) ;; Special variables for ordered lists. - (order-type (let ((bullet (org-list-get-bullet list-beg struct))) - (cond - ((not (equal type "ordered")) nil) - ((string-match "[a-z]" bullet) "loweralpha") - ((string-match "[A-Z]" bullet) "upperalpha") - (t "arabic")))) (counter (let ((count-tmp (org-list-get-counter pos struct))) (cond ((not count-tmp) nil) - ((and (member order-type '("loweralpha" "upperalpha")) - (string-match "[A-Za-z]" count-tmp)) - count-tmp) - ((and (equal order-type "arabic") - (string-match "[0-9]+" count-tmp)) + ((string-match "[A-Za-z]" count-tmp) + (- (string-to-char (upcase count-tmp)) 64)) + ((string-match "[0-9]+" count-tmp) count-tmp))))) ;; When FIRSTP, a new list or sub-list is starting. (when firstp (org-export-docbook-close-para-maybe) - (insert (if (equal type "ordered") - (concat "<orderedlist numeration=\"" order-type "\">\n") - (format "<%slist>\n" type)))) + (insert (format "<%slist>\n" type))) (insert (cond ((equal type "variable") (format "<varlistentry><term>%s</term><listitem>" desc-tag)) diff --git a/lisp/org-html.el b/lisp/org-html.el index 7411ea8..4a6bde9 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -2446,28 +2446,16 @@ the alist of previous items." ;; Always refer to first item to determine list type, in ;; case list is ill-formed. (type (funcall get-type list-beg struct prevs)) - ;; Special variables for ordered lists. - (order-type (let ((bullet (org-list-get-bullet list-beg struct))) - (cond - ((not (equal type "o")) nil) - ((string-match "[a-z]" bullet) "a") - ((string-match "[A-Z]" bullet) "A") - (t "1")))) (counter (let ((count-tmp (org-list-get-counter pos struct))) (cond ((not count-tmp) nil) - ((and (member order-type '("a" "A")) - (string-match "[A-Za-z]" count-tmp)) + ((string-match "[A-Za-z]" count-tmp) (- (string-to-char (upcase count-tmp)) 64)) - ((and (equal order-type "1") - (string-match "[0-9]+" count-tmp)) + ((string-match "[0-9]+" count-tmp) count-tmp))))) (when firstp (org-close-par-maybe) - ;; Treat ordered lists differently because of ORDER-TYPE. - (insert (if (equal type "o") - (concat "<ol type=\"" order-type "\">\n") - (format "<%sl>\n" type)))) + (insert (format "<%sl>\n" type))) (insert (cond ((equal type "d") (format "<dt>%s</dt><dd>\n" desc-tag)) |