Home / Function/ test_haml_syntax() — tailwindcss Function Reference

test_haml_syntax() — tailwindcss Function Reference

Architecture documentation for the test_haml_syntax() function in mod.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  0109a41e_467f_bcc5_3e83_3109874009b7["test_haml_syntax()"]
  67c0e082_b760_8463_2a6c_c5f39c564f98["assert_extract_candidates_contains()"]
  0109a41e_467f_bcc5_3e83_3109874009b7 -->|calls| 67c0e082_b760_8463_2a6c_c5f39c564f98
  99bd82af_ea44_3bb9_15bc_4fd7af18fd2f["pre_process_input()"]
  0109a41e_467f_bcc5_3e83_3109874009b7 -->|calls| 99bd82af_ea44_3bb9_15bc_4fd7af18fd2f
  style 0109a41e_467f_bcc5_3e83_3109874009b7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/mod.rs lines 913–958

    fn test_haml_syntax() {
        for (input, expected) in [
            // Element with classes
            (
                "%body.flex.flex-col.items-center.justify-center",
                vec!["flex", "flex-col", "items-center", "justify-center"],
            ),
            // Plain element
            (
                ".text-slate-500.xl:text-gray-500",
                vec!["text-slate-500", "xl:text-gray-500"],
            ),
            // Element with hash attributes
            (
                ".text-black.xl:text-red-500{ data: { tailwind: 'css' } }",
                vec!["text-black", "xl:text-red-500"],
            ),
            // Element with a boolean attribute
            (
                ".text-green-500.xl:text-blue-500(data-sidebar)",
                vec!["text-green-500", "xl:text-blue-500"],
            ),
            // Element with interpreted content
            (
                ".text-yellow-500.xl:text-purple-500= 'Element with interpreted content'",
                vec!["text-yellow-500", "xl:text-purple-500"],
            ),
            // Element with a hash at the end and an extra class.
            (
                ".text-orange-500.xl:text-pink-500{ class: 'bg-slate-100' }",
                vec!["text-orange-500", "xl:text-pink-500", "bg-slate-100"],
            ),
            // Object reference
            (
                ".text-teal-500.xl:text-indigo-500[@user, :greeting]",
                vec!["text-teal-500", "xl:text-indigo-500"],
            ),
            // Element with an ID
            (
                ".text-lime-500.xl:text-emerald-500#root",
                vec!["text-lime-500", "xl:text-emerald-500"],
            ),
        ] {
            assert_extract_candidates_contains(&pre_process_input(input, "haml"), expected);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does test_haml_syntax() do?
test_haml_syntax() is a function in the tailwindcss codebase.
What does test_haml_syntax() call?
test_haml_syntax() calls 2 function(s): assert_extract_candidates_contains, pre_process_input.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free