Ignore:
Timestamp:
06/16/06 03:23:05 (8 years ago)
Author:
xi
Message:

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"
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/reader.py

    r173 r188  
    140140            self.index += 1 
    141141            if ch in u'\n\x85\u2028\u2029'  \ 
    142                     or (ch == u'\r' and self.buffer[self.pointer+1] != u'\n'): 
     142                    or (ch == u'\r' and self.buffer[self.pointer] != u'\n'): 
    143143                self.line += 1 
    144144                self.column = 0 
Note: See TracChangeset for help on using the changeset viewer.