From 47894d65a0e5f974cff6712073832f5c2046c79f Mon Sep 17 00:00:00 2001 From: Hiroshi Shirosaki Date: Sat, 9 Jan 2016 13:53:34 +0900 Subject: [PATCH] Change match URL in parenthesis We change the regexp of URL in parenthesis to `http\?` pattern because long regexp with many protocol names causes slowness. We reorder and use `\?` for protocol names regexp. --- syntax/markdown.vim | 6 ++---- test/syntax.vader | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 5d59833..fc036c6 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -53,13 +53,11 @@ syn region mkdLink 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 2c18fa9..21d92bf 100644 --- a/test/syntax.vader +++ b/test/syntax.vader @@ -138,7 +138,7 @@ Execute (autolinks can be backslash escaped): AssertNotEqual SyntaxOf('<'), 'mkdDelimiter' Given markdown; -a (http://b) c +a (http://b.bb) c Execute (autolink in parenthesis): AssertNotEqual SyntaxOf('a'), 'mkdInlineURL' -- 2.39.5