Skip to content

Commit

Permalink
Disable code block syntax highlighting when syntax=OFF (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
a5ob7r authored May 7, 2022
1 parent 9068655 commit 3a96439
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ftplugin/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,11 @@ endfunction


function! s:MarkdownRefreshSyntax(force)
if &filetype =~# 'markdown' && line('$') > 1
" Use != to compare &syntax's value to use the same logic run on
" $VIMRUNTIME/syntax/synload.vim.
"
" vint: next-line -ProhibitEqualTildeOperator
if &filetype =~# 'markdown' && line('$') > 1 && &syntax != 'OFF'
call s:MarkdownHighlightSources(a:force)
endif
endfunction
Expand Down

0 comments on commit 3a96439

Please sign in to comment.