Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toml comments are not saved with table arrays #28

Open
ruckustboom opened this issue Aug 9, 2017 · 1 comment
Open

Toml comments are not saved with table arrays #28

ruckustboom opened this issue Aug 9, 2017 · 1 comment
Assignees
Milestone

Comments

@ruckustboom
Copy link

ruckustboom commented Aug 9, 2017

One more (less important) bug with comments in TOML

If you add comments to table arrays, only the last one is kept. Here's an example to better explain

[[products]] # Table List 1
name = "Hammer" # Name 1
sku = 738594937

[[products]] # Table List 2
name = "Nail" # Name 2
sku = 284758393
color = "gray"

becomes

# Table List 2
[[products]]
	# Name 1
	name = "Hammer"
	sku = 738594937

[[products]]
	color = "gray"
	# Name 2
	name = "Nail"
	sku = 284758393

Notice the first table in the array is now marked as Table List 2 and the second is not marked.

Tested in 3.0.1

@TheElectronWill
Copy link
Owner

This is related to issue #29 because the table arrays (and their comments) are stored just like normal arrays.

@TheElectronWill TheElectronWill self-assigned this Sep 1, 2017
@TheElectronWill TheElectronWill changed the title TOML - Comments on table arrays overwritten Comments are not saved with table arrays Mar 6, 2018
@TheElectronWill TheElectronWill changed the title Comments are not saved with table arrays Toml comments are not saved with table arrays Mar 6, 2018
@TheElectronWill TheElectronWill added this to the v3.1 milestone Mar 6, 2018
@TheElectronWill TheElectronWill modified the milestones: v3.1, Backlog May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants