Feature: Markdown: Support SetExt Heading (Issue #209)

Like these
==========

See: https://spec.commonmark.org/0.29/#setext-headings

Note: work for follow_link and VimwikiTOC
This commit is contained in:
Tinmarino
2020-08-04 00:44:01 -04:00
parent 40f02293bf
commit fc056cfeca
8 changed files with 202 additions and 26 deletions

View File

@ -186,6 +186,18 @@ for s:i in range(1,6)
\ '/me=s-1 transparent fold'
endfor
" SetExt header
" TODO mutualise SetExt Regexp
let setex_header1_re = '^\s\{0,3}[^>].*\n\s\{0,3}==\+$'
let setex_header2_re = '^\s\{0,3}[^>].*\n\s\{0,3}--\+$'
execute 'syntax match VimwikiHeader1'
\ . ' /'. setex_header1_re . '/ '
\ 'contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,'.
\ 'VimwikiLink,@Spell'
execute 'syntax match VimwikiHeader2'
\ . ' /'. setex_header2_re . '/ ' .
\ 'contains=VimwikiTodo,VimwikiHeaderChar,VimwikiNoExistsLink,VimwikiCode,'.
\ 'VimwikiLink,@Spell'
let s:options = ' contained transparent contains=NONE'