branch: elpa/textile-mode
commit c0d9de4ef260163895c0ee548896055397be4538
Author: Konstantin Kharlamov <hi-an...@yandex.ru>
Commit: Konstantin Kharlamov <hi-an...@yandex.ru>

    Fix inline-code regexp
    
    Before this a sentence
    
        @-@
    
    would not be considered a code. Not it is.
---
 textile-mode.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/textile-mode.el b/textile-mode.el
index 6e6e097c02..cb21d120c3 100644
--- a/textile-mode.el
+++ b/textile-mode.el
@@ -103,6 +103,15 @@ non-matching parentheses"
    markup
    "\\)\\W"))
 
+(defun textile-inline-code-matcher (markup)
+  "Return the matcher regexp for an inline code"
+  (concat
+   "\\W\\("
+   markup
+   ".+?"
+   markup
+   "\\)\\W"))
+
 (defun textile-list-bullet-matcher (bullet)
   "Return the matcher regexp for a list bullet"
   (concat
@@ -185,7 +194,7 @@ non-matching parentheses"
        ;; citation
        `(,(textile-inline-markup-matcher "\\?\\?") 1 'textile-citation-face 
prepend t)
        ;; code
-       `(,(textile-inline-markup-matcher "@") 1 'textile-inline-code-face t t)
+       `(,(textile-inline-code-matcher "@") 1 'textile-inline-code-face t t)
        ;; deletion
        `(,(textile-inline-markup-matcher "-") 1 'textile-deleted-face prepend 
t)
        ;; insertion

Reply via email to