diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index ae3bd26..e8627cc 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -11,7 +11,7 @@ runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o -setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+ +setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]: if exists('b:undo_ftplugin') let b:undo_ftplugin .= "|setl cms< com< fo< flp<" diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 8fc4727..607488d 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -85,8 +85,8 @@ syn region markdownCode matchgroup=markdownCodeDelimiter start="`" end="`" keepe syn region markdownCode matchgroup=markdownCodeDelimiter start="`` \=" end=" \=``" keepend contains=markdownLineStart syn region markdownCode matchgroup=markdownCodeDelimiter start="^\s*```.*$" end="^\s*```\ze\s*$" keepend -syn match markdownFootnote "\[^[^\]]\]\s*$" -syn match markdownFootnoteDefinition "^\[^[^\]]\]:" +syn match markdownFootnote "\[^[^\]]\+\]" +syn match markdownFootnoteDefinition "^\[^[^\]]\+\]:" if main_syntax ==# 'markdown' for s:type in g:markdown_fenced_languages