File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ 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
+ - Fix class detection in Slim templates with attached attributes and ID ( [ # 14019 ] ( https://github.com/tailwindlabs/tailwindcss/pull/14019 ) )
11
11
12
12
## [ 3.4.6] - 2024-07-16
13
13
Original file line number Diff line number Diff line change @@ -152,6 +152,9 @@ function* buildRegExps(context) {
152
152
utility ,
153
153
] )
154
154
}
155
+
156
+ // 5. Inner matches
157
+ yield / [ ^ < > " ' ` \s . ( ) { } [ \] # = % $ ] [ ^ < > " ' ` \s ( ) { } [ \] # = % $ ] * [ ^ < > " ' ` \s . ( ) { } [ \] # = % : $ ] / g
155
158
}
156
159
157
160
// We want to capture any "special" characters
Original file line number Diff line number Diff line change @@ -486,6 +486,26 @@ test('classes in slim templates starting with number', async () => {
486
486
expect ( extractions ) . toContain ( '2xl:bg-red-300' )
487
487
} )
488
488
489
+ test ( 'classes in slim templates with attributes added' , ( ) => {
490
+ let extractions = defaultExtractor ( `
491
+ .ml-auto[
492
+ data-value='foo'
493
+ ]
494
+ Foo bar
495
+ .mr-auto[data-value='foo']
496
+ Foo bar
497
+ .mt-auto#omg
498
+ Foo bar
499
+ #omg.mb-auto
500
+ Foo bar
501
+ ` )
502
+
503
+ expect ( extractions ) . toContain ( `ml-auto` )
504
+ expect ( extractions ) . toContain ( `mr-auto` )
505
+ expect ( extractions ) . toContain ( `mt-auto` )
506
+ expect ( extractions ) . toContain ( `mb-auto` )
507
+ } )
508
+
489
509
test ( "classes with fractional numeric values don't also generate the whole number utility" , async ( ) => {
490
510
const extractions = defaultExtractor ( `
491
511
<div class="px-1.5 py-2.75">Hello world!</div>
You can’t perform that action at this time.
0 commit comments