diff --git a/CHANGELOG.md b/CHANGELOG.md index e8bf3541ef61..d5e06ff13fe7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Inherit gradient stop positions when using variants ([#11002](https://github.com/tailwindlabs/tailwindcss/pull/11002)) - Honor default `to` position of gradient when using implicit transparent colors ([#11002](https://github.com/tailwindlabs/tailwindcss/pull/11002)) - Ensure `@tailwindcss/oxide` doesn't leak in the stable engine ([#10988](https://github.com/tailwindlabs/tailwindcss/pull/10988)) +- Ensure multiple `theme(spacing[5])` calls with bracket notation in arbitrary properties work ([#11039](https://github.com/tailwindlabs/tailwindcss/pull/11039)) ## [3.3.1] - 2023-03-30 diff --git a/src/lib/defaultExtractor.js b/src/lib/defaultExtractor.js index cf3218736272..6382ca7cf3dc 100644 --- a/src/lib/defaultExtractor.js +++ b/src/lib/defaultExtractor.js @@ -35,7 +35,7 @@ function* buildRegExps(context) { // This is a targeted fix to continue to allow theme() // with square brackets to work in arbitrary properties // while fixing a problem with the regex matching too much - /\[[^\s:'"`]+:[^\s]+?\[[^\s]+?\][^\s]+?\]/, + /\[[^\s:'"`]+:[^\s]+?\[[^\s]+\][^\s]+?\]/, // Utilities regex.pattern([ diff --git a/tests/default-extractor.test.js b/tests/default-extractor.test.js index 13652eee38ca..05a19e62653f 100644 --- a/tests/default-extractor.test.js +++ b/tests/default-extractor.test.js @@ -41,6 +41,9 @@ const htmlExamples = html`