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:
Nicolas Goaziou 2014-07-31 10:59:58 +02:00
parent b81d4d0f6c
commit cc7d757571
1 changed files with 5 additions and 5 deletions

View File

@ -2341,9 +2341,8 @@ holding contextual information."
(org-html-end-plain-list type)))))
;; Case 3: Standard headline. Export it as a section.
(t
(let* ((headline-number
(and numberedp (org-export-get-headline-number headline info)))
(section-number (mapconcat #'number-to-string headline-number "-"))
(let* ((numbers (org-export-get-headline-number headline info))
(section-number (mapconcat #'number-to-string numbers "-"))
(ids (remq nil
(list (org-element-property :CUSTOM_ID headline)
(concat "sec-" section-number)
@ -2371,8 +2370,9 @@ holding contextual information."
(org-html--anchor id nil nil info)))
extra-ids "")
(concat
(mapconcat #'number-to-string headline-number ".")
(and headline-number " ")
(and numberedp
(concat (mapconcat #'number-to-string numbers ".")
" "))
full-text)
level)
;; When there is no section, pretend there is an empty