From 44822aa3c6dbef7dfe5d96c90a498807a68453da Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 8 May 2017 11:33:05 -0400 Subject: [PATCH] Allow fenced language names to contain punctuation Closes https://github.com/tpope/vim-markdown/issues/116 --- syntax/markdown.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 35dd1a3..1b92502 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -108,7 +108,7 @@ if main_syntax ==# 'markdown' if has_key(s:done_include, matchstr(s:type,'[^.]*')) continue endif - exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```*\s*'.matchstr(s:type,'[^=]*').'\>.*$" end="^\s*```*\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') + exe 'syn region markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' matchgroup=markdownCodeDelimiter start="^\s*```*\s*'.matchstr(s:type,'[^=]*').'\S\@!.*$" end="^\s*```*\ze\s*$" keepend contains=@markdownHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') let s:done_include[matchstr(s:type,'[^.]*')] = 1 endfor unlet! s:type