From fc4ebb1b85537d734645e19ff24ee2065674eb75 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 21 Jul 2019 23:04:23 +0200 Subject: [PATCH] lang/markdown: don't misinterpret first line as front matter --- modules/lang/markdown/config.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index 97593f2d3..ab40be47d 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -40,8 +40,11 @@ capture, the end position, and the output buffer.") (add-hook 'markdown-mode-hook #'auto-fill-mode) - (sp-with-modes '(markdown-mode gfm-mode) - (sp-local-pair "```" "```" :post-handlers '(:add ("||\n[i]" "RET")))) + ;; Prevent mis-fontification of YAML metadata blocks in `markdown-mode' which + ;; 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 :i "M-*" #'markdown-insert-list-item