Home / Function/ test_pug_syntax() — tailwindcss Function Reference

test_pug_syntax() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  9b68ce4d_bef4_7f5b_de16_6071ea8839c5["test_pug_syntax()"]
  c09b3ad8_e61d_4dcb_3819_2280661fbc5d["assert_extract_sorted_candidates()"]
  9b68ce4d_bef4_7f5b_de16_6071ea8839c5 -->|calls| c09b3ad8_e61d_4dcb_3819_2280661fbc5d
  99bd82af_ea44_3bb9_15bc_4fd7af18fd2f["pre_process_input()"]
  9b68ce4d_bef4_7f5b_de16_6071ea8839c5 -->|calls| 99bd82af_ea44_3bb9_15bc_4fd7af18fd2f
  style 9b68ce4d_bef4_7f5b_de16_6071ea8839c5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/mod.rs lines 625–649

    fn test_pug_syntax() {
        for (input, expected) in [
            // Class literal
            (
                ".bg-green-300.2xl:bg-red-500",
                vec!["bg-green-300", "2xl:bg-red-500"],
            ),
            (
                ".2xl:bg-red-500.bg-green-300",
                vec!["bg-green-300", "2xl:bg-red-500"],
            ),
            (".xl:col-span-2.xl:pr-8", vec!["xl:col-span-2", "xl:pr-8"]),
            (
                "div.2xl:bg-red-500.bg-green-300",
                vec!["div", "bg-green-300", "2xl:bg-red-500"],
            ),
            // Quoted attribute
            (
                r#"input(type="checkbox" class="px-2.5")"#,
                vec!["input", "type", "checkbox", "class", "px-2.5"],
            ),
        ] {
            assert_extract_sorted_candidates(&pre_process_input(input, "pug"), expected);
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free