]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

:Toc should accept single `=` and `-` as setex header
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Thu, 14 Jan 2016 04:26:00 +0000 (13:26 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Thu, 14 Jan 2016 04:35:45 +0000 (13:35 +0900)
ftplugin/markdown.vim

index 7e2b35e8e51d82d2adac075b3190ebb3d848559a..3f084f2bd73463b8122210806f6d01a3b6babcd7 100644 (file)
@@ -318,7 +318,7 @@ function! s:Toc(...)
                 let b:fenced_block = 0
             endif
         endif
                 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
             let b:is_header = 1
         else
             let b:is_header = 0