The 'N' plain scalar was still recognized as `!!bool`. Fix it (close #26).

This commit is contained in:
Kirill Simonov 2006-08-16 21:07:47 +00:00
parent 29413ea88e
commit 8f9b8bed40
3 changed files with 7 additions and 1 deletions

View File

@ -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'))

View File

@ -3,4 +3,5 @@
"answer": False,
"logical": True,
"option": True,
"but": { "y": "is a string", "n": "is a string" },
}

View File

@ -2,3 +2,8 @@ canonical: yes
answer: NO
logical: True
option: on
but:
y: is a string
n: is a string