Skip to content

Commit 3a96439

Browse files
authored
Disable code block syntax highlighting when syntax=OFF (#580)
1 parent 9068655 commit 3a96439

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ftplugin/markdown.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,11 @@ endfunction
856856

857857

858858
function! s:MarkdownRefreshSyntax(force)
859-
if &filetype =~# 'markdown' && line('$') > 1
859+
" Use != to compare &syntax's value to use the same logic run on
860+
" $VIMRUNTIME/syntax/synload.vim.
861+
"
862+
" vint: next-line -ProhibitEqualTildeOperator
863+
if &filetype =~# 'markdown' && line('$') > 1 && &syntax != 'OFF'
860864
call s:MarkdownHighlightSources(a:force)
861865
endif
862866
endfunction

0 commit comments

Comments
 (0)