From b945b5376eba371c225e4d3608d8616f309a2c1f Mon Sep 17 00:00:00 2001 From: Jason Blevins Date: Mon, 27 Nov 2017 13:41:19 -0500 Subject: [PATCH] Fix syntax-propertize bounds following GFM code block insertion --- markdown-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/markdown-mode.el b/markdown-mode.el index f05f863d..0d05a333 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -5431,18 +5431,18 @@ code block in an indirect buffer after insertion." (indent-to indent) (insert "```" lang) (markdown-syntax-propertize-fenced-block-constructs (point-at-bol) end)) - (let ((indent (current-indentation)) start) + (let ((indent (current-indentation)) start-bol) (delete-horizontal-space :backward-only) (markdown-ensure-blank-line-before) (indent-to indent) - (setq start (point)) + (setq start-bol (point-at-bol)) (insert "```" lang "\n") (indent-to indent) (unless edit (insert ?\n)) (indent-to indent) (insert "```") (markdown-ensure-blank-line-after) - (markdown-syntax-propertize-fenced-block-constructs start (point))) + (markdown-syntax-propertize-fenced-block-constructs start-bol (point))) (end-of-line 0) (when edit (markdown-edit-code-block))))