Home / Function/ test_js_embedded_in_php_syntax() — tailwindcss Function Reference

test_js_embedded_in_php_syntax() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  1f825021_1330_a932_47a9_f5a5b217e2fe["test_js_embedded_in_php_syntax()"]
  a88440ca_3a3f_4a07_4234_760efd75f698["assert_extract_candidates_contains()"]
  1f825021_1330_a932_47a9_f5a5b217e2fe -->|calls| a88440ca_3a3f_4a07_4234_760efd75f698
  style 1f825021_1330_a932_47a9_f5a5b217e2fe fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/mod.rs lines 1003–1033

    fn test_js_embedded_in_php_syntax() {
        // Escaped single quotes
        let input = r#"
            @php
            if ($sidebarIsStashable) {
                $attributes = $attributes->merge([
                    'x-init' => '$el.classList.add(\'-translate-x-full\'); $el.classList.add(\'transition-transform\')',
                ]);
            }
            @endphp
        "#;
        assert_extract_candidates_contains(
            input,
            vec!["-translate-x-full", "transition-transform"],
        );

        // Double quotes
        let input = r#"
            @php
            if ($sidebarIsStashable) {
                $attributes = $attributes->merge([
                    'x-init' => "\$el.classList.add('-translate-x-full'); \$el.classList.add('transition-transform')",
                ]);
            }
            @endphp
        "#;
        assert_extract_candidates_contains(
            input,
            vec!["-translate-x-full", "transition-transform"],
        );
    }

Domain

Subdomains

Frequently Asked Questions

What does test_js_embedded_in_php_syntax() do?
test_js_embedded_in_php_syntax() is a function in the tailwindcss codebase.
What does test_js_embedded_in_php_syntax() call?
test_js_embedded_in_php_syntax() calls 1 function(s): assert_extract_candidates_contains.

Analyze Your Own Codebase

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

Try Supermodel Free