Add markdown syntax support for indented code blocks.
This commit is contained in:
@ -79,9 +79,10 @@ let s:markdown_syntax.number_types = ['1.']
|
||||
let s:markdown_syntax.list_markers = ['-', '*', '+', '1.']
|
||||
let s:markdown_syntax.rxListDefine = '::\%(\s\|$\)'
|
||||
|
||||
" Preformatted text
|
||||
" 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\)'
|
||||
|
||||
" Math block
|
||||
let s:markdown_syntax.rxMathStart = '\$\$'
|
||||
|
@ -190,7 +190,9 @@ syntax match VimwikiTableRow /^\s*|.\+|\s*$/
|
||||
\ VimwikiEqInT,
|
||||
\ @Spell
|
||||
|
||||
|
||||
" 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
|
||||
|
||||
" syntax group highlighting
|
||||
hi def link VimwikiImage VimwikiLink
|
||||
|
Reference in New Issue
Block a user