File tree 3 files changed +16
-3
lines changed
3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
- - Nothing yet!
10
+ ### Fixed
11
+
12
+ - Fix candidate extractor regression ([ #8558 ] ( https://github.com/tailwindlabs/tailwindcss/pull/8558 ) )
11
13
12
14
## [ 3.1.0] - 2022-06-08
13
15
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ function* buildRegExps(context) {
43
43
/ (? ! [ { ( [ ] ] ) / ,
44
44
45
45
// optionally followed by an opacity modifier
46
- / (?: \/ [ ^ \s ' " \\ $ ] * ) ? / ,
46
+ / (?: \/ [ ^ \s ' " \\ > < $ ] * ) ? / ,
47
47
] ) ,
48
48
49
49
regex . pattern ( [
@@ -58,7 +58,7 @@ function* buildRegExps(context) {
58
58
] ) ,
59
59
60
60
// Normal values w/o quotes — may include an opacity modifier
61
- / [ - \/ ] [ ^ \s ' " \\ $ = { ] * / ,
61
+ / [ - \/ ] [ ^ \s ' " \\ $ = { > < ] * / ,
62
62
] )
63
63
) ,
64
64
] ) ,
Original file line number Diff line number Diff line change @@ -438,3 +438,14 @@ test('with double quotes array within function', async () => {
438
438
expect ( extractions ) . toContain ( 'pl-1.5' )
439
439
expect ( extractions ) . not . toContain ( 'pl-1' )
440
440
} )
441
+
442
+ test ( 'with angle brackets' , async ( ) => {
443
+ const extractions = defaultExtractor (
444
+ `<div class="bg-blue-200 <% if (useShadow) { %>shadow-xl<% } %>">test</div>`
445
+ )
446
+
447
+ expect ( extractions ) . toContain ( 'bg-blue-200' )
448
+ expect ( extractions ) . toContain ( 'shadow-xl' )
449
+ expect ( extractions ) . not . toContain ( '>shadow-xl' )
450
+ expect ( extractions ) . not . toContain ( 'shadow-xl<' )
451
+ } )
You can’t perform that action at this time.
0 commit comments