Ignore:
Timestamp:
04/23/06 09:40:57 (9 years ago)
Author:
xi
Message:

Raise an error for colons in the flow context.

File:
1 edited

Legend:

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

    r138 r149  
    13021302                    break 
    13031303                length += 1 
     1304            # It's not clear what we should do with ':' in the flow context. 
     1305            if (self.flow_level and ch == u':' 
     1306                    and self.peek(length+1) not in u'\0 \t\r\n\x28\u2028\u2029,[]{}'): 
     1307                self.forward(length) 
     1308                raise ScannerError("while scanning a plain scalar", start_mark, 
     1309                    "found unexpected ':'", self.get_mark(), 
     1310                    "Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details.") 
    13041311            if length == 0: 
    13051312                break 
Note: See TracChangeset for help on using the changeset viewer.