lang/markdown: don't misinterpret first line as front matter

This commit is contained in:
Henrik Lissner 2019-07-21 23:04:23 +02:00
parent e39a458be7
commit fc4ebb1b85
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -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