diff options
author | Bastien Guerry <bzg@altern.org> | 2013-03-01 16:16:53 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-03-01 16:16:53 +0100 |
commit | 1f591bcc3049d6c522d0c7a59d86770c897cb8b0 (patch) | |
tree | 991474713ee02abe5d19da3d5637f20fe3f351ea | |
parent | e48f13423a9e316666baebc4ac328e285b988e25 (diff) | |
download | org-mode-1f591bcc3049d6c522d0c7a59d86770c897cb8b0.tar.gz |
ox-html.el: Bugfix wrt org-info.js
* ox-html.el (org-html-headline): For headlines whose first
element is a headline and not a section, pretend there is an
empty section (as "") for the correct HTML div to be inserted.
This fixes a bug wrt org-info.js. Thanks to Nicolas for
guiding me through this patch.
-rw-r--r-- | lisp/ox-html.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 3844fa0..85efc3d 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2108,7 +2108,8 @@ holding contextual information." (preferred-id (car ids)) (extra-ids (cdr ids)) (extra-class (org-element-property :HTML_CONTAINER_CLASS headline)) - (level1 (+ level (1- org-html-toplevel-hlevel)))) + (level1 (+ level (1- org-html-toplevel-hlevel))) + (first-content (car (org-element-contents headline)))) (format "<div id=\"%s\" class=\"%s\">%s%s</div>\n" (format "outline-container-%s" (or (org-element-property :CUSTOM_ID headline) @@ -2127,7 +2128,10 @@ holding contextual information." extra-ids "") full-text level1) - contents)))))) + (if (not (eq (org-element-type first-content) 'section)) + (concat (org-html-section first-content "" info) + contents) + contents))))))) ;;;; Horizontal Rule |