toml
toml copied to clipboard
Comments that Precede TOML lines
I have a rather large TOML file template that I did not generate (Telegraf's configuration file). The comments for each section and property precede the relevant bits - this PR allows a flag to be set in the decoder to properly retain these comments. Currently toml
looks for comments that immediately follow - the default behavior is not changed and the relevant tests currently pass.
I hope this helps someone else trying to generate documentation from TOML comments.
(Thanks for doing this PR, I'd love to have this as well!)