mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-21 08:42:07 +03:00
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.
This commit is contained in:
parent
f545735638
commit
9459030d66
@ -22,7 +22,7 @@ color normal "[:,]( |$)"
|
|||||||
color lightmagenta " [12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])"
|
color lightmagenta " [12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])"
|
||||||
color lightmagenta "("([^"]|\\")+"|'[^']+')"
|
color lightmagenta "("([^"]|\\")+"|'[^']+')"
|
||||||
|
|
||||||
# Anchors and references:
|
# Anchors and aliases:
|
||||||
color pink " [&*](\w|-)+( |$)"
|
color pink " [&*](\w|-)+( |$)"
|
||||||
|
|
||||||
# Symbols:
|
# Symbols:
|
||||||
@ -32,9 +32,9 @@ color bold,yellow "^ *(\?|([?:] +)?-) "
|
|||||||
color yellow "[]{}[]"
|
color yellow "[]{}[]"
|
||||||
color normal "^ *: "
|
color normal "^ *: "
|
||||||
|
|
||||||
# Types:
|
# Tags:
|
||||||
color mint " !!(binary|bool|float|int|map|null|omap|seq|set|str)( |$)"
|
color mint " !!(binary|bool|float|int|map|null|omap|seq|set|str)( |$)"
|
||||||
color mint " !(\w|-)+( |$)"
|
color mint " ![^ ]+( |$)"
|
||||||
|
|
||||||
# Escaped characters (first color all as bad, then recolor the good ones):
|
# Escaped characters (first color all as bad, then recolor the good ones):
|
||||||
color lightwhite,red "\\."
|
color lightwhite,red "\\."
|
||||||
|
Loading…
Reference in New Issue
Block a user