diff options
Diffstat (limited to 'representer.py')
-rw-r--r-- | representer.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/representer.py b/representer.py index 03dcbf4..7468060 100644 --- a/representer.py +++ b/representer.py @@ -844,6 +844,16 @@ class RoundTripRepresenter(SafeRepresenter): best_style = True try: comment = getattr(sequence, comment_attrib) + node.comment = comment.comment + # reset any comment already printed information + if node.comment and node.comment[1]: + for ct in node.comment[1]: + ct.reset() + item_comments = comment.items + for v in item_comments.values(): + if v and v[1]: + for ct in v[1]: + ct.reset() item_comments = comment.items node.comment = comment.comment try: |