summaryrefslogtreecommitdiff
path: root/parser.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-08-09 16:48:27 +0200
committerAnthon van der Neut <anthon@mnt.org>2017-08-09 16:48:27 +0200
commit1c728e7d84c177f1c97940b2cf4927f0fa7455c5 (patch)
treee8359e39ecab815ef73496acba867ff208495964 /parser.py
parent291b2e6757d22061acb8ee9a581dc04e3a791847 (diff)
downloadruamel.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.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/parser.py b/parser.py
index 7812628..4136687 100644
--- a/parser.py
+++ b/parser.py
@@ -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