From 8bda0a6b45124c08387f64619489dfb9a4e17758 Mon Sep 17 00:00:00 2001 From: Daniel Mouritzen Date: Thu, 22 Nov 2018 11:00:23 +0100 Subject: [PATCH] Allow more ways to write booleans in YAML See http://yaml.org/type/bool.html and http://yaml.org/spec/1.2/spec.html#id2805071 --- runtime/syntax/yaml.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/syntax/yaml.yaml b/runtime/syntax/yaml.yaml index f334d4dd..b6cef3f1 100644 --- a/runtime/syntax/yaml.yaml +++ b/runtime/syntax/yaml.yaml @@ -6,8 +6,7 @@ detect: rules: - type: "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) " - - constant: "\\b(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\\b" - - constant: "\\b(true|false)\\b" + - constant: "\\b(YES|yes|Y|y|ON|on|TRUE|True|true|NO|no|N|n|OFF|off|FALSE|False|false)\\b" - statement: "(:[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- )" - identifier: "[[:space:]][\\*&][A-Za-z0-9]+" - type: "[-.\\w]+:"