emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] Normalize the construction of outline-container DIV ID


From: Francesco Pizzolante
Subject: [O] [PATCH] Normalize the construction of outline-container DIV ID
Date: Tue, 09 Apr 2013 14:17:30 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.2 (windows-nt)

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 <address@hidden>
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<h%d id=\"%s\">%s%s</h%d>\n"
--
1.7.9



reply via email to

[Prev in Thread] Current Thread [Next in Thread]