emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] org-mime.el: correct element matching regex


From: Jon Miller
Subject: [O] [PATCH] org-mime.el: correct element matching regex
Date: Fri, 12 Dec 2014 12:27:49 -0800

* org-mime.el (org-mime-change-element-style): Correctly capture the
  html element instead of partially.

Passing element of "p" would end up matching and altering "pre"
elements as well. Need to properly anchor the regex to html elements.

TINYCHANGE
---
 contrib/lisp/org-mime.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 44bf91b..f341474 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -111,7 +111,7 @@
 ;; example hook, for setting a dark background in <pre 
style="background-color: #EEE;"> elements
 (defun org-mime-change-element-style (element style)
   "Set new default htlm style for <ELEMENT> elements in exported html."
-  (while (re-search-forward (format "<%s" element) nil t)
+  (while (re-search-forward (format "<%s\\>" element) nil t)
     (replace-match (format "<%s style=\"%s\"" element style))))
 
 (defun org-mime-change-class-style (class style)
-- 
1.9.3

-- 
Jon Miller



reply via email to

[Prev in Thread] Current Thread [Next in Thread]