From: Ciro Santilli Date: Fri, 25 Jul 2014 09:50:01 +0000 (+0200) Subject: Merge pull request #107 from cirosantilli/list-setex-mix X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/3beadab6747d0f2b6256ed7cbdab95630fcbc29e?hp=9ced6869ac811055068cf1dfb9d6904a385fcfeb Merge pull request #107 from cirosantilli/list-setex-mix Fix toc consfuses hyphen list with Setex header. --- 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.