branch: elpa/textile-mode commit 8f8c09ef097a95a713307fdb5c92b9778dfbc1fc Merge: a49d9bf421 c0d9de4ef2 Author: Julien Barnier <jul...@nozav.org> Commit: GitHub <nore...@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