Home / Function/ test_maud_template_extraction() — tailwindcss Function Reference

test_maud_template_extraction() — tailwindcss Function Reference

Architecture documentation for the test_maud_template_extraction() function in rust.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  67b499b6_e43a_6fb7_bc49_1d519c32fd82["test_maud_template_extraction()"]
  b83b130e_f494_4c75_1153_c58b04972660["rust.rs"]
  67b499b6_e43a_6fb7_bc49_1d519c32fd82 -->|defined in| b83b130e_f494_4c75_1153_c58b04972660
  style 67b499b6_e43a_6fb7_bc49_1d519c32fd82 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/pre_processors/rust.rs lines 154–215

    fn test_maud_template_extraction() {
        let input = r#"
            use maud::{html, Markup};

            pub fn main() -> Markup {
                html! {
                    header.px-8.py-4.text-black {
                        "Hello, world!"
                    }
                }
            }
        "#;

        Rust::test_extract_contains(input, vec!["px-8", "py-4", "text-black"]);

        // https://maud.lambda.xyz/elements-attributes.html#classes-and-ids-foo-bar
        let input = r#"
            html! {
                input #cannon .big.scary.bright-red type="button" value="Launch Party Cannon";
            }
        "#;
        Rust::test_extract_contains(input, vec!["big", "scary", "bright-red"]);

        let input = r#"
            html! {
                div."bg-[#0088cc]" { "Quotes for backticks" }
            }
        "#;
        Rust::test_extract_contains(input, vec!["bg-[#0088cc]"]);

        let input = r#"
            html! {
                #main {
                    "Main content!"
                    .tip { "Storing food in a refrigerator can make it 20% cooler." }
                }
            }
        "#;
        Rust::test_extract_contains(input, vec!["tip"]);

        let input = r#"
            html! {
                div."bg-[url(https://example.com)]" { "Arbitrary values" }
            }
        "#;
        Rust::test_extract_contains(input, vec!["bg-[url(https://example.com)]"]);

        let input = r#"
            html! {
                div.px-4.text-black {
                    "Some text, with unbalanced brackets ]["
                }
                div.px-8.text-white {
                    "Some more text, with unbalanced brackets ]["
                }
            }
        "#;
        Rust::test_extract_contains(input, vec!["px-4", "text-black", "px-8", "text-white"]);

        let input = r#"html! { \x.px-4.text-black {  } }"#;
        Rust::test(input, r#"html! { \x px-4 text-black {  } }"#);
    }

Domain

Subdomains

Frequently Asked Questions

What does test_maud_template_extraction() do?
test_maud_template_extraction() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/pre_processors/rust.rs.
Where is test_maud_template_extraction() defined?
test_maud_template_extraction() is defined in crates/oxide/src/extractor/pre_processors/rust.rs at line 154.

Analyze Your Own Codebase

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

Try Supermodel Free