test_string_machine_extraction() — tailwindcss Function Reference
Architecture documentation for the test_string_machine_extraction() function in string_machine.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 0aa0674f_58f6_150b_6195_0f4ef6c633ac["test_string_machine_extraction()"] e92d6055_7491_e838_01ff_8822a35d079f["string_machine.rs"] 0aa0674f_58f6_150b_6195_0f4ef6c633ac -->|defined in| e92d6055_7491_e838_01ff_8822a35d079f style 0aa0674f_58f6_150b_6195_0f4ef6c633ac fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/extractor/string_machine.rs lines 104–137
fn test_string_machine_extraction() {
for (input, expected) in [
// Simple string
("'foo'", vec!["'foo'"]),
// String as part of a candidate
("content-['hello_world']", vec!["'hello_world'"]),
// With nested quotes
(r#"'"`hello`"'"#, vec![r#"'"`hello`"'"#]),
// With escaped opening quote
(r#"'Tailwind\'s_parser'"#, vec![r#"'Tailwind\'s_parser'"#]),
(
r#"'Tailwind\'\'s_parser'"#,
vec![r#"'Tailwind\'\'s_parser'"#],
),
(
r#"'Tailwind\'\'\'s_parser'"#,
vec![r#"'Tailwind\'\'\'s_parser'"#],
),
(
r#"'Tailwind\'\'\'\'s_parser'"#,
vec![r#"'Tailwind\'\'\'\'s_parser'"#],
),
// Spaces are not allowed
("' hello world '", vec![]),
// With unfinished quote
("'unfinished_quote", vec![]),
// An escape at the end will never be valid, because it _must_ be followed by the
// ending quote.
(r#"'escaped_ending_quote\'"#, vec![]),
(r#"'escaped_end\"#, vec![]),
] {
assert_eq!(StringMachine::test_extract_all(input), expected);
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_string_machine_extraction() do?
test_string_machine_extraction() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/string_machine.rs.
Where is test_string_machine_extraction() defined?
test_string_machine_extraction() is defined in crates/oxide/src/extractor/string_machine.rs at line 104.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free