mirror of
https://github.com/denoland/deno.git
synced 2025-02-08 07:16:56 -05:00
fix(fmt): fix incorrect quotes in components (#25249)
Unlike in dprint, `single_quote` option is shared between all formatters, so we shouldn't change this option when formatting attributes in components. This PR fixes this. This problem doesn't affect formatting HTML.
This commit is contained in:
parent
a025475b3f
commit
103265f8a2
1 changed files with 0 additions and 9 deletions
|
@ -403,15 +403,6 @@ pub fn format_html(
|
|||
let mut typescript_config =
|
||||
get_resolved_typescript_config(fmt_options);
|
||||
typescript_config.line_width = hints.print_width as u32;
|
||||
if hints.attr {
|
||||
typescript_config.quote_style = if let Some(true) =
|
||||
fmt_options.single_quote
|
||||
{
|
||||
dprint_plugin_typescript::configuration::QuoteStyle::AlwaysDouble
|
||||
} else {
|
||||
dprint_plugin_typescript::configuration::QuoteStyle::AlwaysSingle
|
||||
};
|
||||
}
|
||||
dprint_plugin_typescript::format_text(
|
||||
&path,
|
||||
text.to_string(),
|
||||
|
|
Loading…
Add table
Reference in a new issue