Skip to content

Commit aa7d685

Browse files
authored
Fix handling of frontmatter option (#595)
1 parent 7231fa4 commit aa7d685

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

after/ftplugin/markdown.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if get(g:, 'vim_markdown_folding_style_pythonic', 0)
2525
let b:fenced_block = 0
2626
endif
2727
" else, if we're caring about front matter
28-
elseif g:vim_markdown_frontmatter == 1
28+
elseif get(g:, 'vim_markdown_frontmatter', 0) == 1
2929
" if we're in front matter and not on line 1
3030
if b:front_matter == 1 && a:lnum > 2
3131
let l0 = getline(a:lnum-1)
@@ -111,7 +111,7 @@ else " vim_markdown_folding_style_pythonic == 0
111111
elseif b:fenced_block == 1
112112
let b:fenced_block = 0
113113
endif
114-
elseif g:vim_markdown_frontmatter == 1
114+
elseif get(g:, 'vim_markdown_frontmatter', 0) == 1
115115
if b:front_matter == 1
116116
if l0 ==# '---'
117117
let b:front_matter = 0

0 commit comments

Comments
 (0)