Repository: tailwindlabs/tailwindcss
File: crates/oxide/src/extractor/pre_processors/clojure.rs (Rust)

Code before:
                        match cursor.curr {
                            // A `.` surrounded by digits is a decimal number, so we don't want to replace it.
                            //
                            // E.g.:
                            // ```
                            // gap-1.5
                            //      ^
                            // ```
                            b'.' if cursor.prev.is_ascii_digit()
                                && cursor.next.is_ascii_digit() =>
                            {
                                // Keep the `.` as-is
                            }
                            // A `.` not surrounded by digits denotes the start of a new class name in a
                            // dot-delimited keyword.
                            //
                            // E.g.:
                            // ```
                            // flex.gap-1.5
                            //     ^
                            // ```
                            b'.' => {
                                result[cursor.pos] = b' ';
                            }
                            // End of keyword.
                            _ if is_keyword_terminator(cursor.curr) => {
                                result[cursor.pos] = b' ';
                                break;
                            }

                            // Consume everything else.
                            _ => {}
                        };
                    }
                }

                // Aggressively discard everything else, reducing false positives and preventing
                // characters surrounding keywords from producing false negatives.
                // E.g.:
                // ```
                // (when condition :bg-white)
                //                          ^
                // ```
                // A ')' is never a valid part of a keyword, but will nonetheless prevent 'bg-white'
                // from being extracted if not discarded.
                _ => {
                    result[cursor.pos] = b' ';
                }
            };

            cursor.advance();

Review comment (suggestion):
```suggestion
                            _ if !is_keyword_character(cursor.curr) => {
```

In conjunction with the earlier comment.

Code after:
                }

                // Consume keyword until a terminating character is reached.
                b':' => {
                    result[cursor.pos] = b' ';
                    cursor.advance();

                    while cursor.pos < len {
                        match cursor.curr {
                            // A `.` surrounded by digits is a decimal number, so we don't want to replace it.
                            //
                            // E.g.:
                            // ```
                            // gap-1.5
                            //      ^
                            // ```
                            b'.' if cursor.prev.is_ascii_digit()
                                && cursor.next.is_ascii_digit() =>
                            {
                                // Keep the `.` as-is
                            }
                            // A `.` not surrounded by digits denotes the start of a new class name in a
                            // dot-delimited keyword.
                            //
                            // E.g.:
                            // ```
                            // flex.gap-1.5
                            //     ^
                            // ```
                            b'.' => {
                                result[cursor.pos] = b' ';
                            }
                            // End of keyword.
                            _ if !is_keyword_character(cursor.curr) => {
                                result[cursor.pos] = b' ';
                                break;
                            }

                            // Consume everything else.
                            _ => {}
                        };

                        cursor.advance();
                    }
                }

                // Aggressively discard everything else, reducing false positives and preventing
                // characters surrounding keywords from producing false negatives.
                // E.g.:
                // ```
                // (when condition :bg-white)