Conceal code blocks

This commit is contained in:
Thomas Faingnaert
2019-07-23 10:26:29 +02:00
committed by Tim Pope
parent fd3f4831be
commit c043a93c84

View File

@@ -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,'[^=]*').'\S\@!.*$" 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') . s:concealends
let s:done_include[matchstr(s:type,'[^.]*')] = 1
endfor
unlet! s:type