diff -r 1dd52aa8897c -r e8f3b5568b21 ThirdParty/Pygments/pygments/lexers/data.py --- a/ThirdParty/Pygments/pygments/lexers/data.py Sat Jan 12 12:11:42 2019 +0100 +++ b/ThirdParty/Pygments/pygments/lexers/data.py Sat Jan 12 12:40:14 2019 +0100 @@ -205,7 +205,7 @@ bygroups(Text, Number), 'ignored-line'), ], - # the %YAG directive + # the %TAG directive 'tag-directive': [ # a tag handle and the corresponding prefix (r'([ ]+)(!|![\w-]*!)' @@ -218,7 +218,7 @@ 'indentation': [ # trailing whitespaces are ignored (r'[ ]*$', something(Text), '#pop:2'), - # whitespaces preceeding block collection indicators + # whitespaces preceding block collection indicators (r'[ ]+(?=[?:-](?:[ ]|$))', save_indent(Text)), # block collection indicators (r'[?:-](?=[ ]|$)', set_indent(Punctuation.Indicator)), @@ -232,6 +232,9 @@ (r'[ ]*(?=#|$)', something(Text), '#pop'), # whitespaces separating tokens (r'[ ]+', Text), + # key with colon + (r'([^,:?\[\]{}\n]+)(:)(?=[ ]|$)', + bygroups(Name.Tag, set_indent(Punctuation, implicit=True))), # tags, anchors and aliases, include('descriptors'), # block collections and scalars @@ -250,7 +253,7 @@ (r'!<[\w#;/?:@&=+$,.!~*\'()\[\]%-]+>', Keyword.Type), # a tag in the form '!', '!suffix' or '!handle!suffix' (r'!(?:[\w-]+!)?' - r'[\w#;/?:@&=+$,.!~*\'()\[\]%-]+', Keyword.Type), + r'[\w#;/?:@&=+$,.!~*\'()\[\]%-]*', Keyword.Type), # an anchor (r'&[\w-]+', Name.Label), # an alias @@ -308,6 +311,9 @@ # a flow mapping indicated by '{' and '}' 'flow-mapping': [ + # key with colon + (r'([^,:?\[\]{}\n]+)(:)(?=[ ]|$)', + bygroups(Name.Tag, Punctuation)), # include flow collection rules include('flow-collection'), # the closing indicator