diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 2fbdf66..39c0f8e 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -23,9 +23,8 @@ function! MarkdownFold() let line = getline(v:lnum) " Regular headers - let depth = match(line, '\(^#\+\)\@<=\( .*$\)\@=') - if depth > 0 - return ">" . depth + if line =~# '^#\+ ' + return ">" . match(line, ' ') endif " Setext style headings