Ignore:
Timestamp:
07/30/06 08:51:05 (8 years ago)
Author:
xi
Message:

Fix a bug when a block scalar is incorrectly emitted in the simple key context.

File:
1 edited

Legend:

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

    r197 r218  
    493493                return '' 
    494494        if self.event.style and self.event.style in '|>': 
    495             if not self.flow_level and self.analysis.allow_block: 
     495            if (not self.flow_level and not self.simple_key_context 
     496                    and self.analysis.allow_block): 
    496497                return self.event.style 
    497498        if not self.event.style or self.event.style == '\'': 
     
    671672            if index == 0: 
    672673                # Leading indicators are special characters. 
    673                 if ch in u'#,[]{}#&*!|>\'\"%@`':  
     674                if ch in u'#,[]{}&*!|>\'\"%@`':  
    674675                    flow_indicators = True 
    675676                    block_indicators = True 
Note: See TracChangeset for help on using the changeset viewer.