diff options
author | Anthon van der Neut <anthon@mnt.org> | 2018-08-13 11:15:32 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2018-08-13 11:15:32 +0200 |
commit | c6c7a98673690f6c46c80c88ba2909b7721fd40a (patch) | |
tree | 678b61ea38d89e4c5f9165586366fbce9a4bedde /emitter.py | |
parent | b49a56399b1086eabf0abb9d86297188db108c19 (diff) | |
download | ruamel.yaml-c6c7a98673690f6c46c80c88ba2909b7721fd40a.tar.gz |
fix issue 102 now also for empty mappings with comments0.15.54
*When this change indeed resolves your problem, please **Close** this 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.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -507,9 +507,9 @@ class Emitter(object): self.indent = self.indents.pop() self.flow_level -= 1 self.write_indicator(u'}', False) - # if self.event.comment and self.event.comment[0]: - # # eol comment on flow sequence - # self.write_post_comment(self.event) + if self.event.comment and self.event.comment[0]: + # eol comment on empty mapping + self.write_post_comment(self.event) self.state = self.states.pop() else: if self.canonical or self.column > self.best_width: @@ -534,7 +534,7 @@ class Emitter(object): self.write_indent() self.write_indicator(u'}', False) if self.event.comment and self.event.comment[0]: - # eol comment on flow mapping + # eol comment on flow mapping, never reached on empty mappings self.write_post_comment(self.event) self.state = self.states.pop() else: |