From d7c81164da55a09ef4333abb5195da2fe2e1ba62 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Mon, 17 Mar 2025 14:54:37 +0100 Subject: [PATCH] =?UTF-8?q?Pre=20process=20``=20in=20Vue=20files=20(#17252)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes an issue where `` in Vue files should be handled as-if it's the language specified in the `lang` attribute. To do this, we added a new Vue pre processor and run the content through the same pre processor logic as we do for other languages. Fixes: #17211 # Test plan 1. Added a test to verify this works 2. Existing tests still work Visually verified against the reproduction in the issue: | Before | After | | --- | --- | | image | image | --------- Co-authored-by: Adam Wathan --- CHANGELOG.md | 1 + Cargo.lock | 14 ++---- crates/oxide/Cargo.toml | 1 + .../oxide/src/extractor/pre_processors/mod.rs | 2 + .../oxide/src/extractor/pre_processors/vue.rs | 46 +++++++++++++++++++ crates/oxide/src/lib.rs | 1 + 6 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 crates/oxide/src/extractor/pre_processors/vue.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ab5eb4c..2c6c8892b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix incorrect angle in `-bg-conic-*` utilities ([#17174](https://github.com/tailwindlabs/tailwindcss/pull/17174)) - Fix `border-[12px_4px]` being interpreted as a `border-color` instead of a `border-width` ([#17248](https://github.com/tailwindlabs/tailwindcss/pull/17248)) - Use the `oklab(…)` function when applying opacity to `currentColor` to work around a crash in Safari 16.4 and 16.5 ([#17247](https://github.com/tailwindlabs/tailwindcss/pull/17247)) +- Pre-process `