From: Ciro Santilli Date: Tue, 8 Jul 2014 08:36:13 +0000 (+0200) Subject: Fix toc consfuses hyphen list with Setex header. X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/6df2d66f145edbb010a0f8468bded18d4cad2077?ds=inline Fix toc consfuses hyphen list with Setex header. Fix #100. --- diff --git a/ftplugin/mkd.vim b/ftplugin/mkd.vim index 36d0b08..4744512 100644 --- a/ftplugin/mkd.vim +++ b/ftplugin/mkd.vim @@ -302,7 +302,7 @@ function! s:Markdown_Toc(...) endif try - silent vimgrep /\(^\S.*\(\n[=-]\+\)\@=\|^#\+\)/ % + silent vimgrep /\(^\S.*\(\n[=-]\+\n\)\@=\|^#\+\)/ % catch /E480/ echom "Toc: No headers." return diff --git a/test/header.md b/test/header.md index 084eef3..7e19083 100644 --- a/test/header.md +++ b/test/header.md @@ -58,6 +58,11 @@ setex h1 single punctuation setex h1 punctuation longer than header ================================ +Prevent list vs Setex confusion: + +- not Setex +- because list + --- Mixed tests.