ox-html: Fix missing section number in ids
* lisp/ox-html.el (org-html-headline): Fix missing section number in div ids. Thanks to Matt Lundin for reporting it. http://permalink.gmane.org/gmane.emacs.orgmode/89291
This commit is contained in:
parent
b81d4d0f6c
commit
cc7d757571
|
@ -2341,9 +2341,8 @@ holding contextual information."
|
||||||
(org-html-end-plain-list type)))))
|
(org-html-end-plain-list type)))))
|
||||||
;; Case 3: Standard headline. Export it as a section.
|
;; Case 3: Standard headline. Export it as a section.
|
||||||
(t
|
(t
|
||||||
(let* ((headline-number
|
(let* ((numbers (org-export-get-headline-number headline info))
|
||||||
(and numberedp (org-export-get-headline-number headline info)))
|
(section-number (mapconcat #'number-to-string numbers "-"))
|
||||||
(section-number (mapconcat #'number-to-string headline-number "-"))
|
|
||||||
(ids (remq nil
|
(ids (remq nil
|
||||||
(list (org-element-property :CUSTOM_ID headline)
|
(list (org-element-property :CUSTOM_ID headline)
|
||||||
(concat "sec-" section-number)
|
(concat "sec-" section-number)
|
||||||
|
@ -2371,8 +2370,9 @@ holding contextual information."
|
||||||
(org-html--anchor id nil nil info)))
|
(org-html--anchor id nil nil info)))
|
||||||
extra-ids "")
|
extra-ids "")
|
||||||
(concat
|
(concat
|
||||||
(mapconcat #'number-to-string headline-number ".")
|
(and numberedp
|
||||||
(and headline-number " ")
|
(concat (mapconcat #'number-to-string numbers ".")
|
||||||
|
" "))
|
||||||
full-text)
|
full-text)
|
||||||
level)
|
level)
|
||||||
;; When there is no section, pretend there is an empty
|
;; When there is no section, pretend there is an empty
|
||||||
|
|
Loading…
Reference in New Issue