Skip to content

Commit 1b538f9

Browse files
committed
🐛 fix(common): preserve source quote style
tombi v1.2.0 applies its string_quote_style rule to keys and values, defaulting to Double, which rewrote literal-quoted keys to basic strings. Quote normalization is owned by normalize_key_quotes and the value string logic, so pin tombi to Preserve and leave those decisions to us.
1 parent a3f1881 commit 1b538f9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

common/src/format_options.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use tombi_config::{
22
ArrayBracketSpaceWidth, ArrayCommaSpaceWidth, FormatOptions, IndentStyle, IndentWidth, LineEnding, LineWidth,
3-
format::FormatRules,
3+
StringQuoteStyle, format::FormatRules,
44
};
55

66
pub fn create_format_options(column_width: usize, indent: usize) -> FormatOptions {
@@ -12,6 +12,7 @@ pub fn create_format_options(column_width: usize, indent: usize) -> FormatOption
1212
line_ending: Some(LineEnding::Lf),
1313
array_bracket_space_width: Some(ArrayBracketSpaceWidth::from(1)),
1414
array_comma_space_width: Some(ArrayCommaSpaceWidth::from(1)),
15+
string_quote_style: Some(StringQuoteStyle::Preserve),
1516
..Default::default()
1617
}),
1718
}

0 commit comments

Comments
 (0)