We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What version of prettier-plugin-tailwindcss are you using?
prettier-plugin-tailwindcss
0.5.3
What version of Tailwind CSS are you using?
3.1.7
What version of Node.js are you using?
18.7.0
What package manager are you using?
npm
What operating system are you using?
macOS
Reproduction URL
https://github.com/hugovandevliert/prettier-plugin-tailwindcss-escaping-slashes
Steps:
npm i
npx prettier --write foo.tsx
git diff
Note: this reproduction repo uses different versions as those listed above.
Describe your issue
Escaping slashes in tailwind classes are stripped when used in combination with classNames.
Original code:
export default () => ( <span className={classNames('md:p-2 m-1 m-3 p-4', "before:content-['\\ea53']")} /> );
After running npx prettier --write file_name.tsx:
npx prettier --write file_name.tsx
export default () => ( <span className={classNames('m-1 m-3 p-4 md:p-2', "before:content-['ea53']")} /> );
Note the missing \\.
\\
The text was updated successfully, but these errors were encountered:
I've merged a fix for this and will try to get a patch out later today 👍
Sorry, something went wrong.
That's impressively quick. Thanks!
thecrypticace
Successfully merging a pull request may close this issue.
What version of
prettier-plugin-tailwindcss
are you using?0.5.3
What version of Tailwind CSS are you using?
3.1.7
What version of Node.js are you using?
18.7.0
What package manager are you using?
npm
What operating system are you using?
macOS
Reproduction URL
https://github.com/hugovandevliert/prettier-plugin-tailwindcss-escaping-slashes
Steps:
npm i
npx prettier --write foo.tsx
git diff
Note: this reproduction repo uses different versions as those listed above.
Describe your issue
Escaping slashes in tailwind classes are stripped when used in combination with classNames.
Original code:
After running
npx prettier --write file_name.tsx
:Note the missing
\\
.The text was updated successfully, but these errors were encountered: