Преглед изворни кода

Export: Don't interpret \par when it is protected

Carsten Dominik пре 16 година
родитељ
комит
866176e0ee
3 измењених фајлова са 12 додато и 5 уклоњено
  1. 2 0
      lisp/ChangeLog
  2. 9 5
      lisp/org-exp.el
  3. 1 0
      lisp/org-footnote.el

+ 2 - 0
lisp/ChangeLog

@@ -420,6 +420,8 @@
 	(org-export-number-lines): New function.
 	(org-export-as-ascii, org-export-as-html): Handle coderef links.
 
+--------------------------------------------------------------------------
+
 2008-12-23  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-remember.el (org-remember-handler): Safer way to get a new

+ 9 - 5
lisp/org-exp.el

@@ -3885,11 +3885,15 @@ lang=\"%s\" xml:lang=\"%s\">
 	      (setq line (concat line "<br/>"))))
 
 	    ;; Check if a paragraph should be started
-	    (while (and org-par-open
-			(string-match "\\\\par\\>" line))
-	      ;; Leave a space in the </p> so that the footnote matcher
-	      ;; does not see this.
-	      (setq line (replace-match "</p ><p >" t t line)))
+	    (let ((start 0))
+	      (while (and org-par-open
+			  (string-match "\\\\par\\>" line start))
+		;; Leave a space in the </p> so that the footnote matcher
+		;; does not see this.
+		(if (not (get-text-property (match-beginning 0)
+					    'org-protected line))
+		    (setq line (replace-match "</p ><p >" t t line)))
+		(setq start (match-end 0))))
 
 	    (insert line "\n")))))
 

+ 1 - 0
lisp/org-footnote.el

@@ -500,4 +500,5 @@ and all references of a footnote label."
 (provide 'org-footnote)
 
 ;; arch-tag: 1b5954df-fb5d-4da5-8709-78d944dbfc37
+
 ;;; org-footnote.el ends here