Skip to content

Commit

Permalink
Fix syntax-propertize bounds following GFM code block insertion
Browse files Browse the repository at this point in the history
  • Loading branch information
jrblevin committed Nov 27, 2017
1 parent ea03dcb commit b945b53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions markdown-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))))

Expand Down

0 comments on commit b945b53

Please sign in to comment.