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

Fix () [] were rendered as links when not in link.
authorCiro Santilli <ciro.santilli@gmail.com>
Mon, 8 Sep 2014 09:45:08 +0000 (11:45 +0200)
committerCiro Santilli <ciro.santilli@gmail.com>
Sun, 28 Sep 2014 20:39:48 +0000 (22:39 +0200)
syntax/mkd.vim
test/syntax.md
test/syntax.vader

index 4677f6546f6b428b9d46fc6d6c5386fe9005ad01..38c3502c126d96fb632cb82028b479e3dcaf7961 100644 (file)
@@ -94,7 +94,7 @@ syn region htmlH6       start="^\s*######"              end="\($\|#\+\)" contain
 syn match  htmlH1       /^.\+\n=\+$/ contains=@Spell
 syn match  htmlH2       /^.\+\n-\+$/ contains=@Spell
 
 syn match  htmlH1       /^.\+\n=\+$/ contains=@Spell
 syn match  htmlH2       /^.\+\n-\+$/ contains=@Spell
 
-syn cluster mkdNonListItem contains=htmlItalic,htmlBold,htmlBoldItalic,mkdFootnotes,mkdID,mkdURL,mkdLink,mkdLinkDef,mkdLineBreak,mkdBlockquote,mkdCode,mkdIndentCode,mkdListItem,mkdRule,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6
+syn cluster mkdNonListItem contains=htmlItalic,htmlBold,htmlBoldItalic,mkdFootnotes,mkdLink,mkdLinkDef,mkdLineBreak,mkdBlockquote,mkdCode,mkdIndentCode,mkdListItem,mkdRule,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6
 
 "highlighting for Markdown groups
 HtmlHiLink mkdString       String
 
 "highlighting for Markdown groups
 HtmlHiLink mkdString       String
index 22f3b1a541ed6f0bf28c435aa812cab0522a5b90..d031c2f745c2ca45e64208a63588177c958b7a33 100644 (file)
@@ -15,3 +15,75 @@ def f
   0
 end
 ```
   0
 end
 ```
+
+# Links
+
+[a](b "c")
+
+[a]()
+
+[good spell](a)
+
+[badd spell](a)
+
+[a](b "c")
+
+[a]( b
+"c" )
+
+a (`a`) b. Fix: <https://github.com/plasticboy/vim-markdown/issues/113>
+
+Escaped:
+
+\[a](b)
+
+[a\]b](c)
+
+## Known failures
+
+Escape does not work:
+
+[a\](b)
+
+Should not be links because of whitespace:
+
+[a] (b)
+
+[a](a
+b)
+
+[a](a b)
+
+# Reference links
+
+Single links:
+
+[a][b]
+
+[good spell][a]
+
+[badd spell][a]
+
+[a][]
+
+[a] []
+
+[a][b] c [d][e]
+
+Reference link followed by inline link:
+
+[a] [b](c)
+
+## Known failures
+
+Should be shortcut reference links:
+
+[a]
+
+[a] b [c]
+
+Should be a single link:
+
+[a] [b]
+
+[a] b [c](d)
index 9d2e866456febbc7e7b9451bc6e986ebb213d013..26f1990fde8e759c8efc7c80cace5a9f87cc16d7 100644 (file)
@@ -9,3 +9,22 @@ Given mkd (italic);
 
 Execute (SyntaxOf(pattern)):
   AssertEqual SyntaxOf('i'), 'htmlItalic'
 
 Execute (SyntaxOf(pattern)):
   AssertEqual SyntaxOf('i'), 'htmlItalic'
+
+Given mkd;
+[a](b)
+
+Execute (link with title):
+  AssertEqual SyntaxOf('a'), 'mkdLink'
+  AssertEqual SyntaxOf('b'), 'mkdURL'
+
+Given mkd;
+(a)
+
+Execute (parenthesis not in link):
+  AssertNotEqual SyntaxOf('a'), 'mkdLink'
+
+Given mkd;
+[a](b) c [d](e)
+
+Execute (multiple links on a line):
+  AssertEqual SyntaxOf('c'), ''