File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ impl PreProcessor for Slim {
9292 //
9393 // However, we also need to make sure that we keep the parens that are part of the
9494 // utility class. E.g.: `bg-(--my-color)`.
95- b'(' if bracket_stack. is_empty ( ) && !matches ! ( cursor. prev, b'-' ) => {
95+ b'(' if bracket_stack. is_empty ( ) && !matches ! ( cursor. prev, b'-' | b'/' ) => {
9696 result[ cursor. pos ] = b' ' ;
9797 bracket_stack. push ( cursor. curr ) ;
9898 }
@@ -236,6 +236,15 @@ mod tests {
236236 "bg-[url(https://example.com)]" ,
237237 ] ,
238238 ) ;
239+
240+ // Top-level class shorthand with parens
241+ let input = r#"
242+ div class="bg-(--my-color) bg-(--my-color)/(--my-opacity)"
243+ "# ;
244+ Slim :: test_extract_contains (
245+ input,
246+ vec ! [ "bg-(--my-color)" , "bg-(--my-color)/(--my-opacity)" ] ,
247+ ) ;
239248 }
240249
241250 #[ test]
You can’t perform that action at this time.
0 commit comments