Commits

Kirill Simonov committed 48e2704

Fixed a problem with a scanner error not detected when no line break at the end of the stream.

  • Participants
  • Parent commits d44feb5

Comments (0)

Files changed (3)

File lib/yaml/scanner.py

         # Set the current intendation to -1.
         self.unwind_indent(-1)
 
-        # Reset everything (not really needed).
+        # Reset simple keys.
+        self.remove_possible_simple_key()
         self.allow_simple_key = False
         self.possible_simple_keys = {}
 

File lib3/yaml/scanner.py

         # Set the current intendation to -1.
         self.unwind_indent(-1)
 
-        # Reset everything (not really needed).
+        # Reset simple keys.
+        self.remove_possible_simple_key()
         self.allow_simple_key = False
         self.possible_simple_keys = {}
 

File tests/data/invalid-item-without-trailing-break.loader-error

+-
+-0