Skip to content

Add MinimumInlineWidth to TomlNode.#29

Open
gibbed wants to merge 1 commit intodezhidki:masterfrom
gibbed:MinimumInlineWidth
Open

Add MinimumInlineWidth to TomlNode.#29
gibbed wants to merge 1 commit intodezhidki:masterfrom
gibbed:MinimumInlineWidth

Conversation

@gibbed
Copy link
Copy Markdown
Contributor

@gibbed gibbed commented Oct 3, 2021

Supported by TomlArray and TomlTable.

I don't know if such a feature would be desired upstream.

The goal is fine-grained control over spacing when writing inline tables, to better format output for human consumption.

So you can do something like this:

rows = [
  { id = 0,   title = "foo" },
  { id = 10,  title = "bar" },
  { id = 100, title = "baz" }
]

By setting MinimumInlineWidth to 3 on each TomlNode for id.

Supported by TomlArray and TomlTable.
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.

1 participant