mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-05 05:42:58 +00:00
ox-html.el (org-html-plain-list): Handle alphabetical ordered list
* ox-html.el (org-html-begin-plain-list): New parameter `ordered-num' to tell whether the list is ordered numerically. (org-html-plain-list): Handle alphabetical ordered list.
This commit is contained in:
parent
6abc114f18
commit
8012d88db7
|
@ -2679,16 +2679,12 @@ the plist used as a communication channel."
|
||||||
|
|
||||||
;;;; Plain List
|
;;;; Plain List
|
||||||
|
|
||||||
;; FIXME Maybe arg1 is not needed because <li value="20"> already sets
|
(defun org-html-begin-plain-list (type ordered-num)
|
||||||
;; the correct value for the item counter
|
|
||||||
(defun org-html-begin-plain-list (type &optional arg1)
|
|
||||||
"Insert the beginning of the HTML list depending on TYPE.
|
"Insert the beginning of the HTML list depending on TYPE.
|
||||||
When ARG1 is a string, use it as the start parameter for ordered
|
If ORDERED-NUM is nil, the list order is alphabetical."
|
||||||
lists."
|
|
||||||
(case type
|
(case type
|
||||||
(ordered
|
(ordered (format "<ol class=\"org-ol\"%s>"
|
||||||
(format "<ol class=\"org-ol\"%s>"
|
(if ordered-num "" " type=\"a\"")))
|
||||||
(if arg1 (format " start=\"%d\"" arg1) "")))
|
|
||||||
(unordered "<ul class=\"org-ul\">")
|
(unordered "<ul class=\"org-ul\">")
|
||||||
(descriptive "<dl class=\"org-dl\">")))
|
(descriptive "<dl class=\"org-dl\">")))
|
||||||
|
|
||||||
|
@ -2703,10 +2699,14 @@ lists."
|
||||||
"Transcode a PLAIN-LIST element from Org to HTML.
|
"Transcode a PLAIN-LIST element from Org to HTML.
|
||||||
CONTENTS is the contents of the list. INFO is a plist holding
|
CONTENTS is the contents of the list. INFO is a plist holding
|
||||||
contextual information."
|
contextual information."
|
||||||
(let* (arg1 ;; (assoc :counter (org-element-map plain-list 'item
|
(let* ((ordered-num
|
||||||
|
(org-element-map plain-list 'item
|
||||||
|
(lambda (i)
|
||||||
|
(null (string-to-number (org-element-property :bullet i))))
|
||||||
|
info 'first-match))
|
||||||
(type (org-element-property :type plain-list)))
|
(type (org-element-property :type plain-list)))
|
||||||
(format "%s\n%s%s"
|
(format "%s\n%s%s"
|
||||||
(org-html-begin-plain-list type)
|
(org-html-begin-plain-list type ordered-num)
|
||||||
contents (org-html-end-plain-list type))))
|
contents (org-html-end-plain-list type))))
|
||||||
|
|
||||||
;;;; Plain Text
|
;;;; Plain Text
|
||||||
|
|
Loading…
Reference in a new issue