summaryrefslogtreecommitdiff
path: root/emitter.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 /emitter.py
parent291b2e6757d22061acb8ee9a581dc04e3a791847 (diff)
downloadruamel.yaml-1c728e7d84c177f1c97940b2cf4927f0fa7455c5.tar.gz
fix issue #25: dropping comment between mapping key and value0.15.24
Diffstat (limited to 'emitter.py')
-rw-r--r--emitter.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/emitter.py b/emitter.py
index fcf3004..3625619 100644
--- a/emitter.py
+++ b/emitter.py
@@ -318,13 +318,14 @@ class Emitter(object):
self.expect_scalar()
elif isinstance(self.event, SequenceStartEvent):
if self.event.comment:
- if self.write_pre_comment(self.event):
- self.indention = False
- self.no_newline = True
+ # print(' >enc', self.event.comment, end=' ')
if self.event.flow_style is False and self.event.comment:
if self.write_post_comment(self.event):
self.indention = False
self.no_newline = True
+ if self.write_pre_comment(self.event):
+ self.indention = False
+ self.no_newline = True
if self.flow_level or self.canonical or self.event.flow_style or \
self.check_empty_sequence():
self.expect_flow_sequence()