From: Hiroshi Shirosaki Date: Thu, 14 Jan 2016 04:26:00 +0000 (+0900) Subject: :Toc should accept single `=` and `-` as setex header X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/a20e6ac08d95e63ab6be26d3f1116c9250f0625e?ds=sidebyside;hp=-c :Toc should accept single `=` and `-` as setex header --- a20e6ac08d95e63ab6be26d3f1116c9250f0625e diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 7e2b35e..3f084f2 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -318,7 +318,7 @@ function! s:Toc(...) let b:fenced_block = 0 endif endif - if l:line =~ '^#\+' || l:l1 =~ '^==\+\s*' || l:l1 =~ '^--\+\s*' + if l:line =~ '^#\+' || (l:l1 =~ '^=\+\s*$' || l:l1 =~ '^-\+\s*$') && l:line =~ '^\S' let b:is_header = 1 else let b:is_header = 0