Browse Source

Improve XHTML validation.

Horizontal rules are not allowed inside a <p>...</p> structure.
We now explicitly exit paragraph mode before inserting the <hr/> tag.
Carsten Dominik 16 years ago
parent
commit
9d13e3c536
2 changed files with 6 additions and 1 deletions
  1. 3 0
      lisp/ChangeLog
  2. 3 1
      lisp/org-exp.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2008-11-03  Carsten Dominik  <dominik@science.uva.nl>
 
+	* org-exp.el (org-export-as-html): Make sure that <hr/> is between
+	paragraphs, not inside.
+
 	* org.el (org-todo): Quote
 	`org-agenda-headline-snapshot-before-repeat'.
 

+ 3 - 1
lisp/org-exp.el

@@ -3130,7 +3130,9 @@ lang=\"%s\" xml:lang=\"%s\">
 
 	  ;; Horizontal line
 	  (when (string-match "^[ \t]*-\\{5,\\}[ \t]*$" line)
-	    (insert "\n<hr/>\n")
+	    (if org-par-open
+		(insert "\n</p>\n<hr/>\n<p>\n")
+	      (insert "\n<hr/>\n"))
 	    (throw 'nextline nil))
 
 	  ;; Blockquotes and verse