Skip to content

Conversation

@SamuelAlev
Copy link
Contributor

@SamuelAlev SamuelAlev commented Feb 15, 2022

Fixes the bug from #7413

The extraction couldn't get those cases:

  • <div className={`${['pr-1.5'].join(' ')}`}><div> (template, normal class, single quotes)
  • <div className={`${["pr-1.5"].join(' ')}`}><div> (template, normal class, double quotes)
  • <div className={`${['tw-h-[100px]'].join(' ')}`}><div> (template, dynamic class, single quotes)
  • <div className={`${["tw-h-[100px]"].join(' ')}`}><div> (template, dynamic class, double quotes)
  • document.body.classList.add(['pr-1.5'].join(" ")); (function, normal class, single quotes)
  • document.body.classList.add(["pr-1.5"].join(" ")); (function, normal class, double quotes)
  • document.body.classList.add(['tw-h-[100px]'].join(" ")); (function, dynamic class, single quotes)
  • document.body.classList.add(["tw-h-[100px]"].join(" ")); (function, dynamic class, double quotes)

@SamuelAlev SamuelAlev changed the title fix: allow extraction from template literal with array Fix extraction from template literal/function with array Feb 15, 2022
@thecrypticace thecrypticace self-assigned this Mar 1, 2022
@thecrypticace thecrypticace merged commit bc46d0e into tailwindlabs:master Mar 1, 2022
@thecrypticace
Copy link
Contributor

Thanks for the fix and writing the tests! 🙌

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.

2 participants