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

Highlight link text with newline
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Wed, 20 Jan 2016 08:08:48 +0000 (17:08 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Wed, 20 Jan 2016 08:08:48 +0000 (17:08 +0900)
syntax/markdown.vim
test/syntax.vader

index 67043a1451801c558a79d2c265869515dfee5b07..e4c0068115cd01598210545f9da8293e0fa29c39 100644 (file)
@@ -53,7 +53,7 @@ syn region htmlBoldItalic start="___\ze\S" end="\S\zs___" keepend
 syn region mkdFootnotes matchgroup=mkdDelimiter start="\[^"    end="\]"
 execute 'syn region mkdID matchgroup=mkdDelimiter    start="\["    end="\]" contained oneline' . s:conceal
 execute 'syn region mkdURL matchgroup=mkdDelimiter   start="("     end=")"  contained oneline' . s:conceal
-execute 'syn region mkdLink matchgroup=mkdDelimiter  start="\\\@<!!\?\[" end="\]\ze[[(]" contains=@mkdNonListItem,@Spell nextgroup=mkdURL,mkdID skipwhite oneline' . s:concealends
+execute 'syn region mkdLink matchgroup=mkdDelimiter  start="\\\@<!!\?\[" end="\n\{-,1}[^]]\{-}\zs\]\ze[[(]" contains=@mkdNonListItem,@Spell nextgroup=mkdURL,mkdID skipwhite oneline' . s:concealends
 
 " Autolink without angle brackets.
 " mkd  inline links:           protocol   optional  user:pass@       sub/domain                 .com, .co.uk, etc      optional port   path/querystring/hash fragment
index 894ed0ed060b4df2202d4b5b1a0b65b3cc23d130..5b9d605d069c6a7ae1f1a0b3eacd5b0a5c87cb07 100644 (file)
@@ -157,6 +157,15 @@ Execute (link with title):
   AssertEqual SyntaxOf('a'), 'mkdLink'
   AssertEqual SyntaxOf('b'), 'mkdURL'
 
+Given markdown;
+[a
+b](c)
+
+Execute (link text with newline):
+  AssertEqual SyntaxOf('a'), 'mkdLink'
+  AssertEqual SyntaxOf('b'), 'mkdLink'
+  AssertEqual SyntaxOf('c'), 'mkdURL'
+
 Given markdown;
 (a)