summaryrefslogtreecommitdiff
path: root/emitter.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-12 10:09:52 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-12 10:09:52 +0200
commitfe4fcdb71f9af1080df3c1580cc3a8d4b2d49e26 (patch)
tree297a60fe4eb6dbceeb381f34363beca7c5967ea3 /emitter.py
parentfbfd585d20035ef6a4ebbfb4be28869715dccbbe (diff)
downloadruamel.yaml-fe4fcdb71f9af1080df3c1580cc3a8d4b2d49e26.tar.gz
fix issue #160 flow mapping in sequence with comment gobbling newline0.15.53
*When this change indeed resolves your problem, please **Close** his issue*. *(You can do so usingthe WorkFlow pull-down (close to the top right of this page)*
Diffstat (limited to 'emitter.py')
-rw-r--r--emitter.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/emitter.py b/emitter.py
index 95b3e9a..4dc053e 100644
--- a/emitter.py
+++ b/emitter.py
@@ -579,10 +579,11 @@ class Emitter(object):
# type: (bool) -> None
if not first and isinstance(self.event, SequenceEndEvent):
if self.event.comment and self.event.comment[1]:
- # final comments from a doc
+ # final comments on a block list e.g. empty line
self.write_pre_comment(self.event)
self.indent = self.indents.pop()
self.state = self.states.pop()
+ self.no_newline = False
else:
if self.event.comment and self.event.comment[1]:
self.write_pre_comment(self.event)