diff options
author | Anthon van der Neut <anthon@mnt.org> | 2019-01-08 18:15:29 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2019-01-08 18:15:29 +0100 |
commit | 4c9add02bb1126436897f61417c1e3a45311f4ac (patch) | |
tree | b5ae450a10942d2e6026500c108dfadc341417d9 /scanner.py | |
parent | c3245ebc020a76e5e31c9f0d756adde83dc3dec7 (diff) | |
download | ruamel.yaml-4c9add02bb1126436897f61417c1e3a45311f4ac.tar.gz |
fix issue #275 not parsing valid flow style mapping with value starting with value indicator
This is only fixed in the pure python version!
*When this change indeed resolves your problem, please **Close** this issue*.
*(You can do so using the WorkFlow pull-down (close to the top right of this page))*
Diffstat (limited to 'scanner.py')
-rw-r--r-- | scanner.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -797,7 +797,10 @@ class Scanner(object): if self.flow_context[-1] == '[': if self.reader.peek(1) not in _THE_END_SPACE_TAB: return False - # if self.reader.peek(1) in '\'"{[]}': + elif self.tokens and isinstance(self.tokens[-1], ValueToken): + # mapping flow context scanning a value token + if self.reader.peek(1) not in _THE_END_SPACE_TAB: + return False return True # VALUE(block context): ':' (' '|'\n') return self.reader.peek(1) in _THE_END_SPACE_TAB |