emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-mime.el: correct element matching regex
       [not found] <mailman.117.1418403631.31732.emacs-orgmode@gnu.org>
@ 2014-12-12 20:27 ` Jon Miller
  2014-12-14  8:34   ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Miller @ 2014-12-12 20:27 UTC (permalink / raw)
  To: emacs-orgmode

* 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] org-mime.el: correct element matching regex
  2014-12-12 20:27 ` [PATCH] org-mime.el: correct element matching regex Jon Miller
@ 2014-12-14  8:34   ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2014-12-14  8:34 UTC (permalink / raw)
  To: Jon Miller; +Cc: emacs-orgmode

Hello,

Jon Miller <jonebird@gmail.com> writes:

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

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-14  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.117.1418403631.31732.emacs-orgmode@gnu.org>
2014-12-12 20:27 ` [PATCH] org-mime.el: correct element matching regex Jon Miller
2014-12-14  8:34   ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).