diff options
author | Anthon van der Neut <anthon@mnt.org> | 2021-05-30 09:25:32 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2021-05-30 09:25:32 +0200 |
commit | 73f4bec5f498b31fd7ce7c2ac7ced187b4fc4920 (patch) | |
tree | e2318c5891b58aecebdb178636c61b7aa6a84193 /constructor.py | |
parent | 17b35c376fd0fc9a94ba0adfdbf5bf63a6177dc9 (diff) | |
download | ruamel.yaml-73f4bec5f498b31fd7ce7c2ac7ced187b4fc4920.tar.gz |
fix for issue 3840.17.5
aliased scalars in !!set would not round trip with ?
Diffstat (limited to 'constructor.py')
-rw-r--r-- | constructor.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/constructor.py b/constructor.py index 199129e..0a5db9b 100644 --- a/constructor.py +++ b/constructor.py @@ -1323,8 +1323,9 @@ class RoundTripConstructor(SafeConstructor): if node.comment: seqtyp._yaml_add_comment(node.comment[:2]) if len(node.comment) > 2: - # this happens e.g. if you have a sequence element that is a flow-style mapping - # and that has no EOL comment but a following commentline or empty line + # this happens e.g. if you have a sequence element that is a flow-style + # mapping and that has no EOL comment but a following commentline or + # empty line seqtyp.yaml_end_comment_extend(node.comment[2], clear=True) else: # NEWCMNT |