Skip to content

Commit 7bea0ba

Browse files
jezalerque
authored andcommitted
Force spellchecking on after loading syntax file
1 parent 5056e63 commit 7bea0ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

syntax/pandoc.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ function! EnableEmbedsforCodeblocksWithLang(entry)
170170
let s:langsyntaxfile = matchstr(a:entry, '[^=]*$')
171171
unlet! b:current_syntax
172172
exe 'syn include @'.toupper(s:langname).' syntax/'.s:langsyntaxfile.'.vim'
173+
" We might have just turned off spellchecking by including the file,
174+
" so we turn it back on here.
175+
exe 'syntax spell toplevel'
173176
exe 'syn region pandocDelimitedCodeBlock_' . s:langname . ' start=/\(\_^\([ ]\{4,}\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s:langname . '\>.*\n\)\@<=\_^/' .
174177
\' end=/\_$\n\(\([ ]\{4,}\|\t\)\=\(`\{3,}`*\|\~\{3,}\~*\)\_$\n\_$\)\@=/ contained containedin=pandocDelimitedCodeBlock' .
175178
\' contains=@' . toupper(s:langname)

0 commit comments

Comments
 (0)