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

Drop defined known scheme
authorHiroshi Shirosaki <h.shirosaki@gmail.com>
Tue, 19 Jan 2016 02:43:22 +0000 (11:43 +0900)
committerHiroshi Shirosaki <h.shirosaki@gmail.com>
Tue, 19 Jan 2016 02:46:06 +0000 (11:46 +0900)
Shorten the regexp because the long pattern is very slow.

syntax/markdown.vim
test/syntax.vader

index 39d5e53ac18dea9e178f2894c5adc09709bbdee0..ec12ef6a004fd99043f0ca523c60a278007d5782 100644 (file)
@@ -57,7 +57,7 @@ syntax match   mkdInlineURL /https\?:\/\/\(\w\+\(:\w\+\)\?@\)\?\([A-Za-z][-_0-9A
 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=")"
 
 " Autolink with angle brackets.
-syn region mkdInlineURL matchgroup=mkdDelimiter start="\\\@<!<\(\(https\?\|ftp\|git\|coap\|doi\|javascript\|aaas\?\|about\|acap\|cap\|cid\|crid\|data\|dav\|dict\|dns\|file\|geo\|go\|gopher\|h323\|iax\|icap\|im\|imap\|info\|ipp\|iris\|iris.beep\|iris.xpc\|iris.xpcs\|iris.lwz\|ldaps\?\|mailto\|mid\|msrp\|msrps\|mtqp\|mupdate\|news\|nfs\|ni\|nih\|nntp\|opaquelocktoken\|pop\|pres\|rtsp\|service\|session\|shttp\|sieve\|sip\|sips\|sms\|snmp,soap.beep\|soap.beeps\|tag\|tel\|telnet\|tftp\|thismessage\|tn3270\|tip\|tv\|urn\|vemmi\|wss\?\|xcon\|xcon-userid\|xmlrpc.beep\|xmlrpc.beeps\|xmpp\|z39.50r\|z39.50s\|adiumxtra\|afp\|afs\|aim\|apt,attachment\|aw\|beshare\|bitcoin\|bolo\|callto\|chrome,chrome-extension\|com-eventbrite-attendee\|content\|cvs,dlna-playsingle\|dlna-playcontainer\|dtn\|dvb\|ed2k\|facetime\|feed\|finger\|fish\|gg\|gizmoproject\|gtalk\|hcp\|icon\|ipn\|irc6\|ircs\?\|itms\|jar\|jms\|keyparc\|lastfm\|magnet\|maps\|market,message\|mms\|ms-help\|msnim\|mumble\|mvn\|notes\|oid\|palm\|paparazzi\|platform\|proxy\|psyc\|query\|res\|resource\|rmi\|rsync\|rtmp\|secondlife\|sftp\|sgn\|skype\|smb\|soldat\|spotify\|ssh\|steam\|svn\|teamspeak\|things\|udp\|unreal\|ut2004\|ventrilo\|view-source\|webcal\|wtai\|wyciwyg\|xfire\|xri\|ymsgr\):\/\/[^> ]*>\)\@=" end=">"
+syn region mkdInlineURL matchgroup=mkdDelimiter start="\\\@<!<\ze[a-z][a-z0-9,.-]\{1,22}:\/\/[^> ]*>" end=">"
 
 " Link definitions: [id]: URL (Optional Title)
 syn region mkdLinkDef matchgroup=mkdDelimiter   start="^ \{,3}\zs\[" end="]:" oneline nextgroup=mkdLinkDefTarget skipwhite
index 7d6f6b14cf2247e49ced8ed6829839e8ede198fb..d985b2c1bccdbf2716f9b388d580f0c313217fc3 100644 (file)
@@ -107,12 +107,6 @@ Given markdown;
 Execute (autolink with scheme case is insensitive):
   AssertEqual SyntaxOf('a'), 'mkdInlineURL'
 
-Given markdown;
-<notascheme://a>
-
-Execute (autolink without known scheme is not a link):
-  AssertNotEqual SyntaxOf('n'), 'mkdInlineURL'
-
 Given markdown;
 <a>