From 78ad6961ae2ef7b50ab036ff12c2ff7c49e90a6a Mon Sep 17 00:00:00 2001 From: Christian Moe Date: Sun, 11 Dec 2011 14:11:05 +0100 Subject: [PATCH] Special blocks: Make well-formed HTML * org-special-blocks.el (org-special-blocks-convert-html-special-cookies): Close paragraph before opening or closing the
, 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
tags in

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 @@ -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 "

\n") - (insert "
\n")) + (when (equal (match-string 2 line) "START") + (org-close-par-maybe) + (insert "\n
") + (org-open-par)) + (when (equal (match-string 2 line) "END") + (org-close-par-maybe) + (insert "\n
") + (org-open-par)) (throw 'nextline nil))) (add-hook 'org-export-html-after-blockquotes-hook