]> 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:

Escape `~` in regexp with folding
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Thu, 14 Jan 2016 06:38:00 +0000 (15:38 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Thu, 14 Jan 2016 08:49:37 +0000 (17:49 +0900)
Add tests for `~`

after/ftplugin/markdown.vim
test/folding-toc.vader

index 84b6a4f57179bc93b1479ecc147fbd20b4997106..06a1583835a7468ddff46145005c1275c01a662e 100644 (file)
@@ -54,7 +54,7 @@ else
             let l0 = getline(a:lnum-1)
         endif
         " keep track of fenced code blocks
-        if l0 =~ '````*' || l0 =~ '~~~~*'
+        if l0 =~ '````*' || l0 =~ '\~\~\~\~*'
             if b:fenced_block == 0
                 let b:fenced_block = 1
             elseif b:fenced_block == 1
index a02f1c2c0dcc5d9eccc6ae18dafc76047ff560b3..950d8cd19a298482f88b59b06e883bc12f4a7532 100644 (file)
@@ -29,7 +29,7 @@ echo "foo"
 
 ~~~~bash
 mkdir foo
-cd foo
+# comment in ~
 ~~~~
 
 ### chap 1.1.1
@@ -74,6 +74,7 @@ Execute (fold level):
   AssertEqual foldlevel(7), 1, '# some bash scripting'
   AssertEqual foldlevel(15), 1, '## chap 1.1'
   AssertEqual foldlevel(21), 2, 'mkdir foo'
+  AssertEqual foldlevel(22), 2, 'comment in ~'
   AssertEqual foldlevel(25), 2, '### chap 1.1.1'
   AssertEqual foldlevel(27), 3, '- dragons'
   AssertEqual foldlevel(30), 1, '# chap 2'