Home / Function/ test_ruby_syntax() — tailwindcss Function Reference

test_ruby_syntax() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

crates/oxide/src/extractor/mod.rs lines 573–621

    fn test_ruby_syntax() {
        for (input, expected) in [
            (r#"%w[flex]"#, vec!["flex"]),
            (r#"%w[flex items-center]"#, vec!["flex", "items-center"]),
            (r#"%w[[color:red]]"#, vec!["[color:red]"]),
            // See: https://github.com/tailwindlabs/tailwindcss/issues/13778
            (
                r#"def call = tag.span "Foo", class: %w[rounded-full h-0.75 w-0.75]"#,
                vec![
                    "def",
                    "call",
                    "span",
                    "class",
                    "rounded-full",
                    "h-0.75",
                    "w-0.75",
                ],
            ),
            (
                r#"def call = tag.span "Foo", class: %w[rounded-full w-0.75 h-0.75]"#,
                vec![
                    "def",
                    "call",
                    "span",
                    "class",
                    "rounded-full",
                    "h-0.75",
                    "w-0.75",
                ],
            ),
            (
                r#"def call = tag.span "Foo", class: %w[w-0.75 h-0.75 rounded-full]"#,
                vec![
                    "def",
                    "call",
                    "span",
                    "class",
                    "rounded-full",
                    "h-0.75",
                    "w-0.75",
                ],
            ),
            // Other similar syntaxes
            (r#"%w[flex]"#, vec!["flex"]),
            (r#"%w(flex)"#, vec!["flex"]),
        ] {
            assert_extract_sorted_candidates(&pre_process_input(input, "rb"), expected);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does test_ruby_syntax() do?
test_ruby_syntax() is a function in the tailwindcss codebase.
What does test_ruby_syntax() call?
test_ruby_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