diff options
| author | Georg Brandl <georg@python.org> | 2016-05-04 16:27:43 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2016-05-04 16:27:43 +0200 |
| commit | 46d327ffec931b5cc09d2b03f491e115ecc31007 (patch) | |
| tree | 2f923c9398a417dc235a081e882732fecfed3e61 /pygments | |
| parent | 8ce6a5ca04a60d8fc4f388ea2a6a688ac32022b8 (diff) | |
| parent | fdbd4b8fda9db85caab00c7734a9decd3a72e8f0 (diff) | |
| download | pygments-git-46d327ffec931b5cc09d2b03f491e115ecc31007.tar.gz | |
Merged in embray/pygments-main (pull request #584)
Fix incorrect lexing of YAML tags
Diffstat (limited to 'pygments')
| -rw-r--r-- | pygments/lexers/data.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py index c88375d5..84d02f49 100644 --- a/pygments/lexers/data.py +++ b/pygments/lexers/data.py @@ -247,10 +247,10 @@ class YamlLexer(ExtendedRegexLexer): # tags, anchors, aliases 'descriptors': [ # a full-form tag - (r'!<[\w;/?:@&=+$,.!~*\'()\[\]%-]+>', Keyword.Type), + (r'!<[\w#;/?:@&=+$,.!~*\'()\[\]%-]+>', Keyword.Type), # a tag in the form '!', '!suffix' or '!handle!suffix' - (r'!(?:[\w-]+)?' - r'(?:![\w;/?:@&=+$,.!~*\'()\[\]%-]+)?', Keyword.Type), + (r'!(?:[\w-]+!)?' + r'[\w#;/?:@&=+$,.!~*\'()\[\]%-]+', Keyword.Type), # an anchor (r'&[\w-]+', Name.Label), # an alias |
