emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/textile-mode 8f8c09ef09 3/3: Merge pull request #5 from Hi


From: ELPA Syncer
Subject: [nongnu] elpa/textile-mode 8f8c09ef09 3/3: Merge pull request #5 from Hi-Angel/fix-inline-code-highlight
Date: Thu, 12 Jan 2023 06:00:54 -0500 (EST)

branch: elpa/textile-mode
commit 8f8c09ef097a95a713307fdb5c92b9778dfbc1fc
Merge: a49d9bf421 c0d9de4ef2
Author: Julien Barnier <julien@nozav.org>
Commit: GitHub <noreply@github.com>

    Merge pull request #5 from Hi-Angel/fix-inline-code-highlight
    
    Fix inline code highlight
---
 textile-mode.el | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/textile-mode.el b/textile-mode.el
index 23271753e5..cb21d120c3 100644
--- a/textile-mode.el
+++ b/textile-mode.el
@@ -24,7 +24,7 @@
 
 ;;; Commentary:
 
-;; An emacs major mode for Textile markup language 
+;; An emacs major mode for Textile markup language
 ;; (https://textile-lang.com/) editing.
 
 ;;; Known bugs or limitations:
@@ -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 
prepend 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

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