branch: elpa/aidermacs
commit 58b3fc29f5046c195951a6315651fa0fc14511ae
Author: Mingde (Matthew) Zeng <matthew...@posteo.net>
Commit: Mingde (Matthew) Zeng <matthew...@posteo.net>

    Match space before ```
    
    Signed-off-by: Mingde (Matthew) Zeng <matthew...@posteo.net>
---
 aidermacs-backend-comint.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/aidermacs-backend-comint.el b/aidermacs-backend-comint.el
index ff7b2dfd04..4b73907d4b 100644
--- a/aidermacs-backend-comint.el
+++ b/aidermacs-backend-comint.el
@@ -72,7 +72,7 @@ This allows for multi-line input without sending the command."
     ("^\\([0-9]+\\). " 0 font-lock-constant-face)
     ("^>>>>>>> REPLACE" 0 'aidermacs-search-replace-block t)
     ("^<<<<<<< SEARCH" 0 'aidermacs-search-replace-block t)
-    ("^\\(```\\)\\([^[:space:]]*\\)" (1 'shadow t) (2 font-lock-builtin-face 
t))
+    ("^[:space:]*\\(```\\)\\([^[:space:]]*\\)" (1 'shadow t) (2 
font-lock-builtin-face t))
     ("^=======$" 0 'aidermacs-search-replace-block t))
   "Font lock keywords for aidermacs buffer.")
 
@@ -247,7 +247,7 @@ _OUTPUT is the text to be processed."
    ;; check if the block has a language id
    (when (save-excursion
            (end-of-line)
-           (re-search-backward "^``` *\\([^[:space:]]+\\)" 
(line-beginning-position -1) t))
+           (re-search-backward "^[:space:]*``` *\\([^[:space:]]+\\)" 
(line-beginning-position -1) t))
      (let* ((lang (downcase (match-string 1)))
             (mode (map-elt aidermacs-language-name-map lang lang)))
        (intern-soft (concat mode "-mode"))))

Reply via email to