commit 78ad6961ae2ef7b50ab036ff12c2ff7c49e90a6a (patch)
parent 7a513b2c0 New option `org-table-formula-field-format'.
tree 43cfe417d45804ad5ea7043658d611148efbe4da
author Christian Moe <mail@christianmoe.com> 2011-12-11 14:11:05 +0100
committer Bastien Guerry <bzg@altern.org> 2011-12-11 14:11:05 +0100
Special blocks: Make well-formed HTML
* org-special-blocks.el
(org-special-blocks-convert-html-special-cookies): Close paragraph
before opening or closing the <div>, and open paragraph after. Also
changed newline placement to be the same as for other blocks.
The problem was that special blocks did not produce well-formed HTML
because they wrapped the opening and closing
<div> tags in <p> tags.
TINYCHANGE
This patch only borrows a few lines from the handling of `CENTER'
blocks in org-export-as-html.
---
lisp/org-special-blocks.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/lisp/org-special-blocks.el b/lisp/org-special-blocks.el
index 2da57f033..590d30d97 100644
--- a/lisp/org-special-blocks.el
+++ b/lisp/org-special-blocks.el
@@ -1,4 +1,3 @@
-
;; Copyright (C) 2009-2011 Free Software Foundation, Inc.
;; Author: Chris Gray <chrismgray@gmail.com>
@@ -81,11 +80,15 @@ seen. This is run after a few special cases are taken care of."
"Converts the special cookies into div blocks."
;; Uses the dynamically-bound variable `line'.
(when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" line)
-; (org-close-par-maybe)
(message "%s" (match-string 1))
- (if (equal (match-string 2 line) "START")
- (insert "<div class=\"" (match-string 1 line) "\">\n")
- (insert "</div>\n"))
+ (when (equal (match-string 2 line) "START")
+ (org-close-par-maybe)
+ (insert "\n<div class=\"" (match-string 1 line) "\">")
+ (org-open-par))
+ (when (equal (match-string 2 line) "END")
+ (org-close-par-maybe)
+ (insert "\n</div>")
+ (org-open-par))
(throw 'nextline nil)))
(add-hook 'org-export-html-after-blockquotes-hook
glossary
--------
Commit objects reference one tree, and zero or more parents.
Single parent commits can typically generate a patch in
unified diff format via `git format-patch'.
Multiple parents means the commit is a merge.
Root commits have no ancestor. Note that it is
possible to have multiple root commits when merging independent histories.
Every commit references one top-level tree object.
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).