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 ce8648ed_3120_b64c_f2bc_ed8344afe747["test_string_machine_extraction()"] 2fb50f57_27a6_296f_80b3_b44c47994dcb["string_machine.rs"] ce8648ed_3120_b64c_f2bc_ed8344afe747 -->|defined in| 2fb50f57_27a6_296f_80b3_b44c47994dcb style ce8648ed_3120_b64c_f2bc_ed8344afe747 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