nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit f5457356386b2cf2716b8ce4de6c502ea7329113
parent bb8f40989fa558ec1cfcf321582993856654a7b9
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun,  3 Oct 2021 10:09:28 +0200

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.

Diffstat:
Msyntax/yaml.nanorc | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/syntax/yaml.nanorc b/syntax/yaml.nanorc @@ -4,7 +4,7 @@ ## License: GPL version 3 or newer syntax yaml "\.ya?ml$" -header "^---( |$)" +header "^%YAML |^---( |$)" tabgives " " comment "#" @@ -26,7 +26,8 @@ color lightmagenta "("([^"]|\\")+"|'[^']+')" color pink " [&*](\w|-)+( |$)" # Symbols: -color bold,lagoon "^(---|\.\.\.)( |$)" " [|>]([1-9]?[+-]|[+-][1-9]?)?$" +color bold,lagoon "^(%YAML +[1-9]\.[0-9]$|%TAG |(---|\.\.\.)( |$))" +color bold,lagoon " [|>]([1-9]?[+-]|[+-][1-9]?)?$" color bold,yellow "^ *(\?|([?:] +)?-) " color yellow "[]{}[]" color normal "^ *: "