@@ -1674,6 +1674,7 @@ TOML_NAMESPACE_START // abi namespace
16741674 indentation = indent_sub_tables | indent_array_elements,
16751675 relaxed_float_precision = (1ull << 11 ),
16761676 terse_key_value_pairs = (1ull << 12 ),
1677+ force_multiline_arrays = (1ull << 13 ),
16771678 };
16781679 TOML_MAKE_FLAGS (format_flags);
16791680
@@ -9890,6 +9891,12 @@ TOML_IMPL_NAMESPACE_START
98909891 return !!(config_.flags & format_flags::terse_key_value_pairs);
98919892 }
98929893
9894+ TOML_PURE_INLINE_GETTER
9895+ bool force_multiline_arrays () const noexcept
9896+ {
9897+ return !!(config_.flags & format_flags::force_multiline_arrays);
9898+ }
9899+
98939900 TOML_EXPORTED_MEMBER_FUNCTION
98949901 void attach (std::ostream& stream) noexcept ;
98959902
@@ -17195,10 +17202,11 @@ TOML_NAMESPACE_START
1719517202 }
1719617203
1719717204 const auto original_indent = indent ();
17198- const auto multiline = TOML_ANON_NAMESPACE::toml_formatter_forces_multiline (
17199- arr,
17200- 120u ,
17201- indent_columns () * static_cast <size_t >(original_indent < 0 ? 0 : original_indent));
17205+ const auto multiline = force_multiline_arrays ()
17206+ || TOML_ANON_NAMESPACE::toml_formatter_forces_multiline (
17207+ arr,
17208+ 120u ,
17209+ indent_columns () * static_cast <size_t >(original_indent < 0 ? 0 : original_indent));
1720217210
1720317211 print_unformatted (" [" sv);
1720417212
0 commit comments