test_haml_pre_processor() — tailwindcss Function Reference
Architecture documentation for the test_haml_pre_processor() function in haml.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 0c698739_a572_9779_c2cc_4e2c73af16f7["test_haml_pre_processor()"] ca2cb7f3_129e_2351_7658_5668e9773b08["haml.rs"] 0c698739_a572_9779_c2cc_4e2c73af16f7 -->|defined in| ca2cb7f3_129e_2351_7658_5668e9773b08 style 0c698739_a572_9779_c2cc_4e2c73af16f7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/extractor/pre_processors/haml.rs lines 352–399
fn test_haml_pre_processor() {
for (input, expected) in [
// Element with classes
(
"%body.flex.flex-col.items-center.justify-center",
"%body flex flex-col items-center justify-center",
),
// Plain element
(
".text-slate-500.xl:text-gray-500",
" text-slate-500 xl:text-gray-500",
),
// Element with hash attributes
(
".text-black.xl:text-red-500{ data: { tailwind: 'css' } }",
" text-black xl:text-red-500 data: { tailwind: 'css' } ",
),
// Element with a boolean attribute
(
".text-green-500.xl:text-blue-500(data-sidebar)",
" text-green-500 xl:text-blue-500 data-sidebar ",
),
// Element with interpreted content
(
".text-yellow-500.xl:text-purple-500= 'Element with interpreted content'",
" text-yellow-500 xl:text-purple-500 'Element with interpreted content'",
),
// Element with a hash at the end and an extra class.
(
".text-orange-500.xl:text-pink-500{ class: 'bg-slate-100' }",
" text-orange-500 xl:text-pink-500 class: 'bg-slate-100' ",
),
// Object reference
(
".text-teal-500.xl:text-indigo-500[@user, :greeting]",
" text-teal-500 xl:text-indigo-500 @user, :greeting ",
),
// Element with an ID
(
".text-lime-500.xl:text-emerald-500#root",
" text-lime-500 xl:text-emerald-500 root",
),
// Dots in strings in HTML attributes stay as-is
(r#"<div id="px-2.5"></div>"#, r#"<div id "px-2.5"></div>"#),
] {
Haml::test(input, expected);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_haml_pre_processor() do?
test_haml_pre_processor() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/pre_processors/haml.rs.
Where is test_haml_pre_processor() defined?
test_haml_pre_processor() is defined in crates/oxide/src/extractor/pre_processors/haml.rs at line 352.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free