tomland
tomland copied to clipboard
Pretty-printing option to inline tables
Currently it expands all tables into the following table structure:
[fooTable]
x = 1
y = true
sometimes it is nicer to have
fooTable = { x = 1, y = true }
@vrom911 That's a nice idea :+1: I'm only thinking about possible UI. What if we don't want all tables to be printed as inline tables? In that case, maybe the pretty-printing settings data type can take a function of type printAsInline :: Key -> Bool, which is const False by default. You can pass const True to print all tables as inline, or elem ["myExample", "anotherExample"] to print only specific keys as inline tables.
I had some issues with understanding the valid specs (opened the issue in TOML), so I think this issue is a bit trickier than it could look. Needs to be done more carefully and tested properly.