emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Normalize the construction of outline-container DIV ID
@ 2013-04-09 12:17 Francesco Pizzolante
  2013-04-09 17:05 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Francesco Pizzolante @ 2013-04-09 12:17 UTC (permalink / raw)
  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 <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org>
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Normalize the construction of outline-container DIV ID
  2013-04-09 12:17 [PATCH] Normalize the construction of outline-container DIV ID Francesco Pizzolante
@ 2013-04-09 17:05 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2013-04-09 17:05 UTC (permalink / raw)
  To: Francesco Pizzolante; +Cc: mailing-list-org-mode



Hi Francesco,

"Francesco Pizzolante"
<fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org> writes:

> 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).

Applied, thanks.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-09 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-09 12:17 [PATCH] Normalize the construction of outline-container DIV ID Francesco Pizzolante
2013-04-09 17:05 ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).