Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
In TOML it is possible to have any amount of comments between the last array element and the closing brackets.
How should we store the non-inline comment after value 1, but before the closing brackets?
This is the same issue as with comments at the end of a file, which is currently solved by assigning this comments to the file-root key (where comment metakeys have the special meaning of being "at the end of the file"). The same solution is not possible in this case, since any comment metakey with index > 0 assigned to a non-root key is interpreted as "comment before the key".
Thank you for asking the question.
In general I am already impressed how far you already went in preserving the file structure. I do not think we need to go further. At least not at the moment. Now is time to get your plugin to be ready as default storage plugin. But if you need a decision for the implementation...
Yes, I like this solution. We only need to document this. (Ideally with a whole file where you see where all comments go to.)
This is a very tricky question but a bit abusing of the possibility that you can add comments everywhere, e.g.:
I think in such situations, like with whitespaces, we do not need to 100% preserve the initial file. So it is okay if your example gets reordered to:
I am looking forward to a big example file where one sees where everything gets assigned to (full meta key name like