Closed fho closed 2 years ago
Good catch, thank you for reporting it!
This issue should be fixed with https://github.com/pelletier/go-toml/commit/b2e0231cc93a72b48158c2bc7e01fd46d5fde74f. Feel free to re-open if you are still experiencing the issue!
@pelletier thanks a lot! :-)
Describe the bug When the
comment
tag of a struct that is marshalled contains newline characters (\n
), it is encoded into an invalid TOML document. In the encoded version only the first line of the comment starts with the comment character (#
). All other lines of the comments are missing it.Using
\n
in comment tags generated valid multiline comments in v1.How To Reproduce
Generated TOML document:
Expected behavior
I expected the following generated TOML document:
Versions