diff options
| author | Greg Dubicki <grzegorz.dubicki@gmail.com> | 2022-11-14 11:29:22 +0000 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2022-11-14 14:59:14 +0100 |
| commit | 9aa5fc0185a6c8fa82337af02ebc78dbed90dac8 (patch) | |
| tree | 9a8a0b1b434450436c25bb8e56b4ac3b466fa291 /pygments | |
| parent | 8abbd68251af1c551daed8d5ffafb14d2e95d9a8 (diff) | |
| download | pygments-git-9aa5fc0185a6c8fa82337af02ebc78dbed90dac8.tar.gz | |
Accept colon(s) in YAML key names
as it's ok according to the YAML specs and is widely used in the real world,
f.e. in Puppet's Hiera (https://puppet.com/docs/puppet/7/hiera_quick.html#values_common_data)
Diffstat (limited to 'pygments')
| -rw-r--r-- | pygments/lexers/data.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py index e7d0a843..d1887304 100644 --- a/pygments/lexers/data.py +++ b/pygments/lexers/data.py @@ -231,7 +231,7 @@ class YamlLexer(ExtendedRegexLexer): # whitespaces separating tokens (r'[ ]+', Whitespace), # key with colon - (r'''([^#,:?\[\]{}"'\n]+)(:)(?=[ ]|$)''', + (r'''([^#,?\[\]{}"'\n]+)(:)(?=[ ]|$)''', bygroups(Name.Tag, set_indent(Punctuation, implicit=True))), # tags, anchors and aliases, include('descriptors'), |
