File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
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
77
88## [ Unreleased]
99
10- - Nothing yet!
10+ - Fix trailing ) from interfering with extraction in Clojure keywords ( [ # 18345 ] ( https://github.com/tailwindlabs/tailwindcss/pull/18345 ) )
1111
1212## [ 4.1.11] - 2025-06-26
1313
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ use bstr::ByteSlice;
66pub struct Clojure ;
77
88#[ inline]
9- fn is_keyword_terminator ( byte : u8 ) -> bool {
9+ fn is_keyword_character ( byte : u8 ) -> bool {
1010 matches ! (
1111 byte,
12- b'" ' | b'; ' | b'@ ' | b'^ ' | b'` ' | b'~ ' | b'( ' | b') ' | b'[' | b']' | b'{' | b'}' | b'\\ '
13- ) || byte. is_ascii_whitespace ( )
12+ b'+ ' | b'- ' | b'/ ' | b'* ' | b'_ ' | b'# ' | b'. ' | b': ' | b'? '
13+ ) | byte. is_ascii_alphanumeric ( )
1414}
1515
1616impl PreProcessor for Clojure {
@@ -58,10 +58,9 @@ impl PreProcessor for Clojure {
5858 // Consume keyword until a terminating character is reached.
5959 b':' => {
6060 result[ cursor. pos ] = b' ' ;
61+ cursor. advance ( ) ;
6162
6263 while cursor. pos < len {
63- cursor. advance ( ) ;
64-
6564 match cursor. curr {
6665 // A `.` surrounded by digits is a decimal number, so we don't want to replace it.
6766 //
@@ -87,14 +86,16 @@ impl PreProcessor for Clojure {
8786 result[ cursor. pos ] = b' ' ;
8887 }
8988 // End of keyword.
90- _ if is_keyword_terminator ( cursor. curr ) => {
89+ _ if ! is_keyword_character ( cursor. curr ) => {
9190 result[ cursor. pos ] = b' ' ;
9291 break ;
9392 }
9493
9594 // Consume everything else.
9695 _ => { }
9796 } ;
97+
98+ cursor. advance ( ) ;
9899 }
99100 }
100101
You can’t perform that action at this time.
0 commit comments