Disable syntax for indented code blocks.

The behavior within lists is not correct.
This commit is contained in:
Rane Brown
2020-01-08 06:03:40 -07:00
parent d9412218e3
commit 75c557bcbc
4 changed files with 5 additions and 24 deletions

@ -82,7 +82,8 @@ let s:markdown_syntax.rxListDefine = '::\%(\s\|$\)'
" Preformatted text (code blocks)
let s:markdown_syntax.rxPreStart = '\%(`\{3,}\|\~\{3,}\)'
let s:markdown_syntax.rxPreEnd = '\%(`\{3,}\|\~\{3,}\)'
let s:markdown_syntax.rxIndentedCodeBlock = '^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+\(^\s*\n\)'
" TODO see syntax/vimwiki_markdown_custom.vim for more info
" let s:markdown_syntax.rxIndentedCodeBlock = '\%(^\n\)\@1<=\%(\%(\s\{4,}\|\t\+\).*\n\)\+'
" Math block
let s:markdown_syntax.rxMathStart = '\$\$'

@ -190,9 +190,10 @@ syntax match VimwikiTableRow /^\s*|.\+|\s*$/
\ VimwikiEqInT,
\ @Spell
" TODO fix behavior within lists https://github.github.com/gfm/#list-items
" indented code blocks https://github.github.com/gfm/#indented-code-blocks
execute 'syntax match VimwikiIndentedCodeBlock /' . vimwiki#vars#get_syntaxlocal('rxIndentedCodeBlock') . '/'
hi def link VimwikiIndentedCodeBlock VimwikiPre
" execute 'syntax match VimwikiIndentedCodeBlock /' . vimwiki#vars#get_syntaxlocal('rxIndentedCodeBlock') . '/'
" hi def link VimwikiIndentedCodeBlock VimwikiPre
" syntax group highlighting
hi def link VimwikiImage VimwikiLink