From cc7d7575714fc3b5a1f149ab4476c8690fe68184 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 31 Jul 2014 10:59:58 +0200 Subject: [PATCH] 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 --- lisp/ox-html.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index af4232cf9..22d0b049d 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -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