Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

fix: avoid infinite loop for square brackets custom modifier #167

Merged
merged 1 commit into from
Mar 27, 2021

Conversation

fedeci
Copy link
Contributor

@fedeci fedeci commented Mar 27, 2021

Fixes #165 and fixes #166 and fixes #168
We check for square brackets at the end of the string only on the first iteration to avoid infinite loops.
Furthermore we correctly return prefix and modifier for:

string[]
- strin []
+ string []

@u12206050
Copy link

Can confirm this fixes the infinite loop: #168

But since my own styles are still not showing correct I am unable to confirm that this fixes the issue and doesn't create a new one.

@adamwathan
Copy link
Member

@u12206050 What styles aren't working for you so I can test it? They worked in v0.1.11?

@adamwathan adamwathan merged commit a4df8ee into tailwindlabs:main Mar 27, 2021
@adamwathan
Copy link
Member

Thanks so much for the PR, merged! I've removed the charCode bit just to make this the simplest possible change necessary to fix the open issues because I wasn't sure I understood what it was solving — can you tell me more about what issue that solves? Just want to make sure I understand before I blindly merge that part in 👍🏻 Thanks again!

@u12206050
Copy link

@adamwathan Thanks, after using this code it is the first time I actually get to view my site using tailwind jit.
It seems very random what styles aren't working but a quick overview reveals the following styles not being applied:

fixed
hidden
flex

@adamwathan
Copy link
Member

Hmm can't reproduce, if you can create a new issue with a reproduction repository that demonstrates the problem happy to look 👍🏻

@fedeci fedeci deleted the fix-165 branch March 27, 2021 11:21
@adamwathan
Copy link
Member

adamwathan commented Mar 27, 2021

@fedeci Nevermind I understand now! Thanks again 👊

@u12206050
Copy link

I created a new project from scratch just to double check and things work fine, so is just something wrong with my postcss/webpack 5 setup.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maximum call stack size exceeded Typescript Syntax JIT does not work
3 participants