From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Francesco Pizzolante" Subject: [PATCH] Normalize the construction of outline-container DIV ID Date: Tue, 09 Apr 2013 14:17:30 +0200 Message-ID: <8761zv3nl1.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: mailing-list-org-mode Hi, I found that, when exporting to HTML, outline-container IDs are not always built the same way: - if the headline has an Org ID it is build using that ID: outline-container-ID; - if the headline does not have an Org ID, then the outline-container DIV will use the headline number instead (outline-container-X) while the ID of the inner headline is sec-X. I propose a patch to always build the outline-container DIV ID the same way by using the inner headline ID (when exporting to HTML). Regards, Francesco >From 0e84e6ce8b808f15b0b84cc575b6d9eeb9e374b4 Mon Sep 17 00:00:00 2001 From: Francesco Pizzolante Date: Tue, 9 Apr 2013 13:38:19 +0200 Subject: [PATCH] Normalize the construction of outline-container DIV ID * ox-html.el (org-html-headline): Normalize the construction of outline-container DIVs by always using the inner headline ID. TINYCHANGE --- lisp/ox-html.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 39b0ec9..fe7b822 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2194,7 +2194,7 @@ holding contextual information." "div") (format "outline-container-%s" (or (org-element-property :CUSTOM_ID headline) - section-number)) + (concat "sec-" section-number))) (concat (format "outline-%d" level1) (and extra-class " ") extra-class) (format "\n%s%s\n" -- 1.7.9