Benno Schulenberg
9459030d66
syntax: yaml: allow any character in tags except whitespace
...
This will colorize also invalid tags, but the rules are too complicated
to catch in a simple regex.
See https://yaml.org/spec/1.2.2/#691-node-tags .
2021-10-03 10:41:03 +02:00
Benno Schulenberg
f545735638
syntax: yaml: colorize the two known directives
...
See https://yaml.org/spec/1.2.2/#68-directives .
Also, recognize a Yaml file from a %YAML directive on the first line.
2021-10-03 10:14:04 +02:00
Benno Schulenberg
675ad6386d
syntax: yaml: colorize the question mark of complex mappings too
...
See https://yaml.org/spec/1.2.2/#22-structures , example 2.11.
Also make the dash more visible by bolding it.
2021-10-02 17:15:50 +02:00
Benno Schulenberg
6ce3487b65
syntax: yaml: colorize backslash-escaped characters as valid or invalid
...
See https://yaml.org/spec/1.2.2/#57-escaped-characters .
Also prevent an escaped double quote from breaking the coloring of
a string, and allow hyphens in an anchor.
2021-10-02 17:15:32 +02:00
Benno Schulenberg
71a73a1a10
syntax: yaml: allow double colon in key & do not colorize unspaced colon
...
Perl keys can contain a double colon. And unspaced colons occur
quite regularly in values (URLs, IPv6 addresses, and the like)
and should not be colored as if they were an error.
2021-10-01 09:44:43 +02:00
Benno Schulenberg
c2790a8af3
syntax: yaml: new file -- coloring rules for YAML files
...
This fulfills https://bugs.debian.org/982091 .
Requested-by: Otto Kekäläinen <otto@debian.org>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2021-09-29 17:14:03 +02:00