diff --git a/lib/yaml/resolver.py b/lib/yaml/resolver.py index f49eda6..6062406 100644 --- a/lib/yaml/resolver.py +++ b/lib/yaml/resolver.py @@ -153,7 +153,7 @@ class Resolver(BaseResolver): Resolver.add_implicit_resolver( u'tag:yaml.org,2002:bool', - re.compile(ur'''^(?:yes|Yes|YES|n|N|no|No|NO + re.compile(ur'''^(?:yes|Yes|YES|no|No|NO |true|True|TRUE|false|False|FALSE |on|On|ON|off|Off|OFF)$''', re.X), list(u'yYnNtTfFoO')) diff --git a/tests/data/construct-bool.code b/tests/data/construct-bool.code index 389d2c0..3d02580 100644 --- a/tests/data/construct-bool.code +++ b/tests/data/construct-bool.code @@ -3,4 +3,5 @@ "answer": False, "logical": True, "option": True, + "but": { "y": "is a string", "n": "is a string" }, } diff --git a/tests/data/construct-bool.data b/tests/data/construct-bool.data index e751222..36d6519 100644 --- a/tests/data/construct-bool.data +++ b/tests/data/construct-bool.data @@ -2,3 +2,8 @@ canonical: yes answer: NO logical: True option: on + + +but: + y: is a string + n: is a string