Bladeren bron

Export: Fix bug with empty lines in examples

Patch by Baoqiu Cui.
Carsten Dominik 16 jaren geleden
bovenliggende
commit
3825cc6bcb
2 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. 3 1
      lisp/org-docbook.el
  2. 3 1
      lisp/org-html.el

+ 3 - 1
lisp/org-docbook.el

@@ -653,7 +653,9 @@ publishing directory."
 		(replace-match "\\2\n"))
 	      (insert line "\n")
 	      (while (and lines
-			  (or (not ind) (equal ind (get-text-property 0 'original-indentation (car lines))))
+			  (or (= (length (car lines)) 0)
+			      (not ind)
+			      (equal ind (get-text-property 0 'original-indentation (car lines))))
 			  (or (= (length (car lines)) 0)
 			      (get-text-property 0 'org-protected (car lines))))
 		(insert (pop lines) "\n"))

+ 3 - 1
lisp/org-html.el

@@ -850,7 +850,9 @@ lang=\"%s\" xml:lang=\"%s\">
 		(replace-match "\\2\n"))
 	      (insert line "\n")
 	      (while (and lines
-			  (or (not ind) (equal ind (get-text-property 0 'original-indentation (car lines))))
+			  (or (= (length (car lines)) 0)
+			      (not ind)
+			      (equal ind (get-text-property 0 'original-indentation (car lines))))
 			  (or (= (length (car lines)) 0)
 			      (get-text-property 0 'org-protected (car lines))))
 		(insert (pop lines) "\n"))