You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'd like to have TOML output with sub-tables not getting indented. It's not really a problem, just a personal preference.
Describe the solution you'd like
A flag for the formatter: allow_indentation, defaults to true.
Or, if the flags property of the formatter defaults to no flags set, disallow_indentation.
Ah this is a good suggestion, and would be trivial to implement. I'll try to make time to implement this (and a few other small QoL fixes) at some point soon.
@W4RH4WK I've pushed an implementation of this to the v3 branch. There are two new additions to toml::format_flags:
indent_sub_tables: enables the indenting of sub-tables (for TOML formatter) or sub-objects (JSON formatter)
indent_array_elements enables the indenting of array elements when an array is long enough to require multiple lines
Both are enabled by default as part of the 'default' flag set for each formatter (since that was the existing behaviour), but you can achieve what you want by specifically overriding indent_sub_tables:
Is your feature request related to a problem? Please describe.
I'd like to have TOML output with sub-tables not getting indented. It's not really a problem, just a personal preference.
Describe the solution you'd like
A flag for the formatter:
allow_indentation
, defaults to true.Or, if the flags property of the formatter defaults to no flags set,
disallow_indentation
.Additional context
Instead of this:
I'd like to have this:
The text was updated successfully, but these errors were encountered: