From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Miller Subject: [PATCH] org-mime.el: correct element matching regex Date: Fri, 12 Dec 2014 12:27:49 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzWok-0004NI-AJ for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 15:28:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzWob-0003zw-9W for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 15:28:02 -0500 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:33081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzWob-0003yS-2S for emacs-orgmode@gnu.org; Fri, 12 Dec 2014 15:27:53 -0500 Received: by mail-pa0-f50.google.com with SMTP id bj1so7848015pad.23 for ; Fri, 12 Dec 2014 12:27:51 -0800 (PST) Received: from localhost ([129.46.73.20]) by mx.google.com with ESMTPSA id cc3sm2225430pdb.67.2014.12.12.12.27.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Dec 2014 12:27:50 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * 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
 elements
 (defun org-mime-change-element-style (element style)
   "Set new default htlm style for  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