summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-01-25 13:18:28 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2012-01-25 13:18:28 +0100
commitc4fad02b060efb56d59ca9155f0a99d8716c22c0 (patch)
tree8d95f303022512b05e39d7573b8bd64258199b3f
parent1742683e4fc81c269ed0e9346ebb163cd456a818 (diff)
downloadorg-mode-c4fad02b060efb56d59ca9155f0a99d8716c22c0.tar.gz
org-e-latex: Fix an infloop with inline images
* EXPERIMENTAL/org-e-latex.el (org-e-latex-link--inline-image): Fix an infloop.
-rw-r--r--EXPERIMENTAL/org-e-latex.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/EXPERIMENTAL/org-e-latex.el b/EXPERIMENTAL/org-e-latex.el
index 5de0595..733d34d 100644
--- a/EXPERIMENTAL/org-e-latex.el
+++ b/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")