Procházet zdrojové kódy

Export: Stop LaTeX fragment processing in protected examples

LaTeX fragments like math environments were still matched inside
protected code examples.  Fixed now.
Carsten Dominik před 16 roky
rodič
revize
44ed0394c4
2 změnil soubory, kde provedl 8 přidání a 1 odebrání
  1. 5 0
      lisp/ChangeLog
  2. 3 1
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-02-06  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-format-latex): Do not convert LaTeX fragments in
+	protected examples.
+
 2009-02-04  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-exp.el (org-export-html-style-default): Use color values

+ 3 - 1
lisp/org.el

@@ -12725,7 +12725,9 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
       (when (member m matchers)
 	(goto-char (point-min))
 	(while (re-search-forward re nil t)
-	  (when (or (not at) (equal (cdr at) (match-beginning n)))
+	  (when (and (or (not at) (equal (cdr at) (match-beginning n)))
+		     (not (get-text-property (match-beginning n)
+					     'org-protected)))
 	    (setq txt (match-string n)
 		  beg (match-beginning n) end (match-end n)
 		  cnt (1+ cnt)