瀏覽代碼

org-e-latex: Fix an infloop with inline images

* EXPERIMENTAL/org-e-latex.el (org-e-latex-link--inline-image): Fix an
  infloop.
Nicolas Goaziou 13 年之前
父節點
當前提交
c4fad02b06
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. 5 6
      EXPERIMENTAL/org-e-latex.el

+ 5 - 6
EXPERIMENTAL/org-e-latex.el

@@ -1319,12 +1319,11 @@ INFO is a plist containing export options."
 	   (t ""))))
     ;; Now clear ATTR from any special keyword and set a default
     ;; value if nothing is left.
-    (if (not attr)
-	(setq attr "")
-      (while (string-match "\\(wrap\\|multicolumn\\|float\\|placement=\\S-+\\)"
-			   attr)
-	(replace-match "" nil nil attr))
-      (setq attr (org-trim attr)))
+    (setq attr
+	  (if (not attr) ""
+	    (org-trim
+	     (replace-regexp-in-string
+	      "\\(wrap\\|multicolumn\\|float\\|placement=\\S-+\\)" "" attr))))
     (setq attr (cond ((not (string= attr "")) attr)
 		     ((eq disposition 'float) "width=0.7\\textwidth")
 		     ((eq disposition 'wrap) "width=0.48\\textwidth")