Skip to content

Comments that Precede TOML lines - #375

Open
amunchet wants to merge 8 commits into
uiri:masterfrom
amunchet:before_comments
Open

Comments that Precede TOML lines #375
amunchet wants to merge 8 commits into
uiri:masterfrom
amunchet:before_comments

Conversation

@amunchet

Copy link
Copy Markdown

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.

@wimax-grapl

Copy link
Copy Markdown

(Thanks for doing this PR, I'd love to have this as well!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants