Fixed #550: Error in syntax highlighting of \href's

This commit is contained in:
Karl Yngve Lervåg 2016-09-13 22:04:06 +02:00
parent e3028cb9cd
commit e687d39281
2 changed files with 2 additions and 5 deletions

View File

@ -52,9 +52,7 @@ syntax region texUrl matchgroup=Delimiter start='{' end='}' contained
syntax match texStatement '\\href' nextgroup=texHref
syntax region texHref matchgroup=Delimiter start='{' end='}' contained
\ nextgroup=texHrefLinkText
syntax region texHrefLinkText matchgroup=Delimiter start='{' end='}' contained
\ contains=@Spell
\ nextgroup=texMatcher
syntax match texStatement '\\hyperref' nextgroup=texHyperref
syntax region texHyperref matchgroup=Delimiter start='\[' end='\]' contained
@ -62,7 +60,6 @@ syntax region texHyperref matchgroup=Delimiter start='\[' end='\]' contained
highlight link texUrl Function
highlight link texUrlVerb texUrl
highlight link texHref texUrl
highlight link texHrefLinkText texSectionZone
highlight link texHyperref texRefZone
" }}}1

View File

@ -83,7 +83,7 @@ const double pi = 3.1415926535
% Urls and hrep
\url{http://www.google.com}
\url+http://www.google.com+
\href{http://example.com}{Title text}
\href{http://example.com}{Title text $with math$}
\urldef{\mysite}\url{http://example.com}
\hyperref[asdasd]{asd}