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
  224513a2_95ce_e8e1_d2ae_d50f768a0589["test_ruby_syntax()"]
  0fcd0fda_f6d1_052f_9575_133f5b2763a7["mod.rs"]
  224513a2_95ce_e8e1_d2ae_d50f768a0589 -->|defined in| 0fcd0fda_f6d1_052f_9575_133f5b2763a7
  0b7ae7d0_7e0e_b8cd_767a_15a18e3d04c9["assert_extract_sorted_candidates()"]
  224513a2_95ce_e8e1_d2ae_d50f768a0589 -->|calls| 0b7ae7d0_7e0e_b8cd_767a_15a18e3d04c9
  cfc07640_f3ad_1fd8_e118_770b90d7badd["pre_process_input()"]
  224513a2_95ce_e8e1_d2ae_d50f768a0589 -->|calls| cfc07640_f3ad_1fd8_e118_770b90d7badd
  style 224513a2_95ce_e8e1_d2ae_d50f768a0589 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, defined in crates/oxide/src/extractor/mod.rs.
Where is test_ruby_syntax() defined?
test_ruby_syntax() is defined in crates/oxide/src/extractor/mod.rs at line 573.
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