Skip to content

Bad charactrers cannot be used as separators #5

@hritikaggarwal2

Description

@hritikaggarwal2
  • node version: 20.9.0
  • npm version: 10.2.1

Relevant code or config

input = `test dark:(p-2 hover:(bg-red) text-blue)`,
expected output = `test dark:p-2 dark:text-blue dark:hover:bg-red`,
actual output = `test dark:(p-2 hover:bg-red text-blue)`,

What you did: Used a space as a separator around my variants, and got some interesting edge cases

What happened: Since space it also a bad character, the variant groups create several issues when trying to use it as a separator

Problem description: Using a bad character as a separator can lead to unexpected issues with the tailwind group variants.

Suggested solution: Add some special logic to recognize if the selected separator is also a bad character and proceed accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions