Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Oxide scanner bugs #15974

Merged
merged 8 commits into from
Jan 28, 2025
Merged

Fix Oxide scanner bugs #15974

merged 8 commits into from
Jan 28, 2025

Conversation

philipp-spiess
Copy link
Member

Fixes #15632
Fixes #15740

This PR fixes a number of Oxide scanner bugs reported over various channels, specifically:

  • When using the Svelte class shorthand split over various lines, we weren't extracting class names properly:

    <div
      class:underline={isUnderline}>
    </div>
  • We now extract classes when using the class shortcut in Angular:

    <div [class.underline]=\"bool\"></div>
  • We now validate parentheses within arbitrary candidates so that we don't consume invalid arbitrary candidates anymore which allows us to parse the following case properly:

    const classes = [wrapper("bg-red-500")]

Test plan

Added unit tests

@philipp-spiess philipp-spiess requested a review from a team as a code owner January 28, 2025 15:16
@RobinMalfait RobinMalfait enabled auto-merge (squash) January 28, 2025 16:18
@RobinMalfait RobinMalfait merged commit b492187 into next Jan 28, 2025
5 checks passed
@RobinMalfait RobinMalfait deleted the fix/oxide-parser branch January 28, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v4] Angular conditional class not recognized by tailwind [v4] Class Detection Bug
3 participants