diff options
-rw-r--r-- | Cargo.lock | 4 | ||||
-rw-r--r-- | cli/Cargo.toml | 2 | ||||
-rw-r--r-- | cli/tools/fmt.rs | 1 | ||||
-rw-r--r-- | tests/specs/fmt/astro_file_with_css_comment/__test__.jsonc | 5 | ||||
-rw-r--r-- | tests/specs/fmt/astro_file_with_css_comment/fmt.out | 2 | ||||
-rw-r--r-- | tests/specs/fmt/astro_file_with_css_comment/main.astro | 8 |
6 files changed, 19 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock index 1c9fafb30..1e2ce3ee5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4306,9 +4306,9 @@ dependencies = [ [[package]] name = "malva" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e6e9f16e424a6672f6726daf965333952dece79ef3d17aac712b92b3b72d0a8" +checksum = "484beda6e5d775ed06a8ec0fce79e51d39f49d834ed2a29da3f437079321804f" dependencies = [ "aho-corasick", "itertools 0.13.0", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 63ad21c37..882c8d8bc 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -123,7 +123,7 @@ libc.workspace = true libz-sys.workspace = true log = { workspace = true, features = ["serde"] } lsp-types.workspace = true -malva = "=0.9.0" +malva = "=0.10.1" markup_fmt = "=0.12.0" memmem.workspace = true monch.workspace = true diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs index feb716100..2b8beda37 100644 --- a/cli/tools/fmt.rs +++ b/cli/tools/fmt.rs @@ -907,6 +907,7 @@ fn get_resolved_malva_config( }; let language_options = LanguageOptions { + align_comments: true, hex_case: HexCase::Lower, hex_color_length: None, quotes: if let Some(true) = options.single_quote { diff --git a/tests/specs/fmt/astro_file_with_css_comment/__test__.jsonc b/tests/specs/fmt/astro_file_with_css_comment/__test__.jsonc new file mode 100644 index 000000000..295d2c2c3 --- /dev/null +++ b/tests/specs/fmt/astro_file_with_css_comment/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "tempDir": true, + "args": "fmt --unstable-component", + "output": "fmt.out" +} diff --git a/tests/specs/fmt/astro_file_with_css_comment/fmt.out b/tests/specs/fmt/astro_file_with_css_comment/fmt.out new file mode 100644 index 000000000..f6d1be92d --- /dev/null +++ b/tests/specs/fmt/astro_file_with_css_comment/fmt.out @@ -0,0 +1,2 @@ +[WILDCARD]main.astro +Checked 1 file diff --git a/tests/specs/fmt/astro_file_with_css_comment/main.astro b/tests/specs/fmt/astro_file_with_css_comment/main.astro new file mode 100644 index 000000000..1fa1a5c09 --- /dev/null +++ b/tests/specs/fmt/astro_file_with_css_comment/main.astro @@ -0,0 +1,8 @@ +<style> + /* + CSS + */ + body { + font-family: 'Arial', sans-serif; + } +</style>
\ No newline at end of file |