awslabs/duvet

python toml library treat "#" as comment although it is in a quote

Closed this issue · 1 comments

python toml library treat "#" as comment although it is in a quote

[[spec]]
level = "MUST"
quote = '''
The keyring MUST attempt to serialize the decryption materials'
(structures.md#decryption-materials) encryption context
(structures.md#encryption-context-1) in the same format as the
serialization of the message header AAD key value pairs (../data-
format/message-header.md#key-value-pairs).
'''

will be parsed as

The keyring MUST attempt to serialize the decryption materials'
(structures.md                                         
(structures.md                                                
serialization of the message header AAD key value pairs (../data-
format/message-header.md      

a solution would be replace all "#" before let it parsed by TOML library. and then change it back.

I change toml parser library from toml to tomli and it is fixed.