diff options
author | Anthon van der Neut <anthon@mnt.org> | 2017-08-09 16:48:27 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2017-08-09 16:48:27 +0200 |
commit | 1c728e7d84c177f1c97940b2cf4927f0fa7455c5 (patch) | |
tree | e8359e39ecab815ef73496acba867ff208495964 /parser.py | |
parent | 291b2e6757d22061acb8ee9a581dc04e3a791847 (diff) | |
download | ruamel.yaml-1c728e7d84c177f1c97940b2cf4927f0fa7455c5.tar.gz |
fix issue #25: dropping comment between mapping key and value0.15.24
Diffstat (limited to 'parser.py')
-rw-r--r-- | parser.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -542,7 +542,6 @@ class Parser(object): def parse_block_mapping_key(self): # type: () -> Any - next_token = self.scanner.peek_token() # print('>>>> tk', type(self), next_token, getattr(next_token, 'comment', None)) if self.scanner.check_token(KeyToken): token = self.scanner.get_token() @@ -587,7 +586,7 @@ class Parser(object): self.state = self.parse_block_mapping_key comment = token.comment if comment is None: - comment=self.scanner.peek_token().comment + comment = self.scanner.peek_token().comment return self.process_empty_scalar(token.end_mark, comment=comment) else: self.state = self.parse_block_mapping_key |