Commits

Kirill Simonov committed 5a4688f

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

Comments (0)

Files changed (3)

lib/yaml/resolver.py

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

tests/data/construct-bool.code

     "answer": False,
     "logical": True,
     "option": True,
+    "but": { "y": "is a string", "n": "is a string" },
 }

tests/data/construct-bool.data

 answer: NO
 logical: True
 option: on
+
+
+but:
+    y: is a string
+    n: is a string
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.