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

Array of tables produces redundant empty line #65

Closed
AndrewSav opened this issue Aug 8, 2020 · 1 comment
Closed

Array of tables produces redundant empty line #65

AndrewSav opened this issue Aug 8, 2020 · 1 comment

Comments

@AndrewSav
Copy link

Trying this:

class Test
{
	public string FirstName { get; set;}
	public string Surname { get; set;}
}
class Enc
{
	public Test[] Stuff {get; set;}
}

...

Test t1 = new Test { FirstName = "Bill", Surname = "Gates" };
Test t2 = new Test { FirstName = "Barbara", Surname = "Streisand" };
Test[] t = new[] { t1, t2 };
Enc e = new Enc {Stuff = t};
Console.WriteLine(Toml.WriteString(e));

Getting:


[[Stuff]]
FirstName = "Bill"
Surname = "Gates"
[[Stuff]]
FirstName = "Barbara"
Surname = "Streisand"

With an empty line as the very first line of the output. Is it possible not to produce it?

@AndrewSav
Copy link
Author

Sorry wrong repo.

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

No branches or pull requests

1 participant