source: pyyaml/trunk/tests/data/remove-possible-simple-key-bug.loader-error @ 188

Revision 188, 116 bytes checked in by xi, 11 years ago (diff)

Fix several problems caused by ill-formed documents.

The line number is not calculated correctly for DOS-style line breaks.

Fix error reporting in remove_possible_simple_key. The problem is caused by the document:

+foo: &A bar
+*A ]

Raise an error for a complex key which is not indented correctly, for instance:

? "foo"
 : "bar"
[188]1foo: &A bar
2*A ]    # The ']' indicator triggers remove_possible_simple_key,
3        # which should raise an error.
Note: See TracBrowser for help on using the repository browser.