From 31f209886ce824a5a998e932359f77f9aac5d289 Mon Sep 17 00:00:00 2001 From: Hiroshi Shirosaki Date: Tue, 19 Jan 2016 11:43:22 +0900 Subject: [PATCH 1/1] Drop defined known scheme Shorten the regexp because the long pattern is very slow. --- syntax/markdown.vim | 2 +- test/syntax.vader | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 39d5e53..ec12ef6 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -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="\\\@ ]*>\)\@=" end=">" +syn region mkdInlineURL matchgroup=mkdDelimiter start="\\\@ ]*>" end=">" " Link definitions: [id]: URL (Optional Title) syn region mkdLinkDef matchgroup=mkdDelimiter start="^ \{,3}\zs\[" end="]:" oneline nextgroup=mkdLinkDefTarget skipwhite diff --git a/test/syntax.vader b/test/syntax.vader index 7d6f6b1..d985b2c 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -107,12 +107,6 @@ Given markdown; Execute (autolink with scheme case is insensitive): AssertEqual SyntaxOf('a'), 'mkdInlineURL' -Given markdown; - - -Execute (autolink without known scheme is not a link): - AssertNotEqual SyntaxOf('n'), 'mkdInlineURL' - Given markdown; -- 2.39.5