summaryrefslogtreecommitdiff
path: root/tokens.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2018-08-12 17:35:24 +0200
committerAnthon van der Neut <anthon@mnt.org>2018-08-12 17:35:24 +0200
commitbf95947e11492f1060819036694daed38237d10e (patch)
tree10379f559c2192fb07809579799dc9225d2a8521 /tokens.py
parent21ddf0cc5db2ef31a2852308f6c5926521b5b3a7 (diff)
downloadruamel.yaml-bf95947e11492f1060819036694daed38237d10e.tar.gz
fix issue #163 comment disappearing in list before flow mapping
should be fixed in 0.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 'tokens.py')
-rw-r--r--tokens.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tokens.py b/tokens.py
index 72c4f48..5176520 100644
--- a/tokens.py
+++ b/tokens.py
@@ -27,6 +27,10 @@ class Token(object):
arguments += u', line: ' + str(self.start_mark.line)
except: # NOQA
pass
+ try:
+ arguments += u', comment: ' + str(self._comment)
+ except: # NOQA
+ pass
return u'{}({})'.format(self.__class__.__name__, arguments)
def add_post_comment(self, comment):