lang/markdown: don't misinterpret first line as front matter
This commit is contained in:
parent
e39a458be7
commit
fc4ebb1b85
1 changed files with 5 additions and 2 deletions
|
@ -40,8 +40,11 @@ capture, the end position, and the output buffer.")
|
||||||
|
|
||||||
(add-hook 'markdown-mode-hook #'auto-fill-mode)
|
(add-hook 'markdown-mode-hook #'auto-fill-mode)
|
||||||
|
|
||||||
(sp-with-modes '(markdown-mode gfm-mode)
|
;; Prevent mis-fontification of YAML metadata blocks in `markdown-mode' which
|
||||||
(sp-local-pair "```" "```" :post-handlers '(:add ("||\n[i]" "RET"))))
|
;; occurs when the first line contains a colon in it. See
|
||||||
|
;; https://github.com/jrblevin/markdown-mode/issues/328.
|
||||||
|
(advice-add :markdown-match-generic-metadata
|
||||||
|
:override #'+markdown-disable-front-matter-fontification-a)
|
||||||
|
|
||||||
(map! :map markdown-mode-map
|
(map! :map markdown-mode-map
|
||||||
:i "M-*" #'markdown-insert-list-item
|
:i "M-*" #'markdown-insert-list-item
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue