]> 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 URL syntax regex
authorAlexandre Constantino <dreaming.about.electric.sheep@gmail.com>
Wed, 10 Feb 2016 19:41:33 +0000 (19:41 +0000)
committerAlexandre Constantino <dreaming.about.electric.sheep@gmail.com>
Wed, 10 Feb 2016 19:41:33 +0000 (19:41 +0000)
Enables domain names that start with digits

syntax/markdown.vim
test/syntax.vader

index 9e0eb497d4d3a5935013489c0685bbaf3d4cea86..07adae9e193184e991e9c3a3225839175833b1ec 100644 (file)
@@ -62,8 +62,8 @@ execute 'syn region mkdLink matchgroup=mkdDelimiter  start="\\\@<!!\?\[" end="\n
 
 " Autolink without angle brackets.
 " mkd  inline links:           protocol   optional  user:pass@       sub/domain                 .com, .co.uk, etc      optional port   path/querystring/hash fragment
-"                            ------------ _____________________ --------------------------- ________________________ ----------------- __
-syntax match   mkdInlineURL /https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A-Za-z]*\.\)\{1,}\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*/
+"                            ------------ _____________________ ----------------------------- ________________________ ----------------- __
+syntax match   mkdInlineURL /https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z0-9][-_0-9A-Za-z]*\.\)\{1,}\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*/
 
 " Autolink with parenthesis.
 syntax region  mkdInlineURL matchgroup=mkdDelimiter start="(\(https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A-Za-z]*\.\)\{1,}\(\w\{2,}\.\?\)\{1,}\(:[0-9]\{1,5}\)\?\S*)\)\@=" end=")"
index 8ac0a2823047634b20e4d1d0b437ab5adeb655ed..5286b0bd79ac84d2431b01f1a632c59bf4f39796 100644 (file)
@@ -217,6 +217,12 @@ Execute (autolink):
   AssertEqual SyntaxOf('>'), 'mkdDelimiter'
   AssertNotEqual SyntaxOf('c'), 'mkdInlineURL'
 
+Given markdown;
+http://12monkeys.foo
+
+Execute (autolink with domain starting with a number):
+  AssertEqual SyntaxOf('12monkeys'), 'mkdInlineURL'
+
 Given markdown;
 <HtTp://a>