From: Hiroshi Shirosaki Date: Sat, 9 Jan 2016 04:53:34 +0000 (+0900) Subject: Change match URL in parenthesis X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/47894d65a0e5f974cff6712073832f5c2046c79f 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. --- 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'