Automatic detection of nested syntaxes in markdown

This commit is contained in:
John Conroy 2016-10-29 00:58:15 -04:00
parent 4831384ab9
commit 8534219694

View File

@ -1994,7 +1994,7 @@ endfunction "}}}
" vimwiki#base#detect_nested_syntax " vimwiki#base#detect_nested_syntax
function! vimwiki#base#detect_nested_syntax() "{{{ function! vimwiki#base#detect_nested_syntax() "{{{
let last_word = '\v.*<(\w+)\s*$' let last_word = '\v.*<(\w+)\s*$'
let lines = map(filter(getline(1, "$"), 'v:val =~ "{{{" && v:val =~ last_word'), let lines = map(filter(getline(1, "$"), 'v:val =~ "\\%({{{\\|```\\)" && v:val =~ last_word'),
\ 'substitute(v:val, last_word, "\\=submatch(1)", "")') \ 'substitute(v:val, last_word, "\\=submatch(1)", "")')
let dict = {} let dict = {}
for elem in lines for elem in lines