test_ruby_pre_processor() — tailwindcss Function Reference
Architecture documentation for the test_ruby_pre_processor() function in ruby.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 3576ce45_d2e0_a712_cf5f_36457d480480["test_ruby_pre_processor()"] de63b342_bc8b_68a8_063b_cc3f8524fd2c["ruby.rs"] 3576ce45_d2e0_a712_cf5f_36457d480480 -->|defined in| de63b342_bc8b_68a8_063b_cc3f8524fd2c style 3576ce45_d2e0_a712_cf5f_36457d480480 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/extractor/pre_processors/ruby.rs lines 231–299
fn test_ruby_pre_processor() {
for (input, expected) in [
// %w[…]
("%w[flex px-2.5]", "%w flex px-2.5 "),
(
"%w[flex data-[state=pending]:bg-[#0088cc] flex-col]",
"%w flex data-[state=pending]:bg-[#0088cc] flex-col ",
),
// %w{…}
("%w{flex px-2.5}", "%w flex px-2.5 "),
(
"%w{flex data-[state=pending]:bg-(--my-color) flex-col}",
"%w flex data-[state=pending]:bg-(--my-color) flex-col ",
),
// %w(…)
("%w(flex px-2.5)", "%w flex px-2.5 "),
(
"%w(flex data-[state=pending]:bg-(--my-color) flex-col)",
"%w flex data-[state=pending]:bg-(--my-color) flex-col ",
),
// %w …\n
("%w flex px-2.5\n", "%w flex px-2.5\n"),
// Use backslash to embed spaces in the strings.
(r#"%w[foo\ bar baz\ bat]"#, r#"%w foo bar baz bat "#),
(r#"%W[foo\ bar baz\ bat]"#, r#"%W foo bar baz bat "#),
// The nested delimiters evaluated to a flat array of strings
// (not nested array).
(r#"%w[foo[bar baz]qux]"#, r#"%w foo[bar baz]qux "#),
(
"# test\n# test\n# {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!]\n%w[flex px-2.5]",
" \n \n \n%w flex px-2.5 "
),
(r#""foo # bar""#, r#""foo # bar""#),
(r#"'foo # bar'"#, r#"'foo # bar'"#),
(
r#"def call = tag.span "Foo", class: %w[rounded-full h-0.75 w-0.75]"#,
r#"def call = tag.span "Foo", class: %w rounded-full h-0.75 w-0.75 "#
),
(r#"%w[foo ' bar]"#, r#"%w foo ' bar "#),
(r#"%w[foo " bar]"#, r#"%w foo " bar "#),
(r#"%W[foo ' bar]"#, r#"%W foo ' bar "#),
(r#"%W[foo " bar]"#, r#"%W foo " bar "#),
(r#"%p foo ' bar "#, r#"%p foo ' bar "#),
(r#"%p foo " bar "#, r#"%p foo " bar "#),
(
"%p has a ' quote\n# this should be removed\n%p has a ' quote",
"%p has a ' quote\n \n%p has a ' quote"
),
(
"%p has a \" quote\n# this should be removed\n%p has a \" quote",
"%p has a \" quote\n \n%p has a \" quote"
),
(
"%w#this text is kept# # this text is not",
"%w this text is kept ",
),
] {
Ruby::test(input, expected);
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_ruby_pre_processor() do?
test_ruby_pre_processor() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/pre_processors/ruby.rs.
Where is test_ruby_pre_processor() defined?
test_ruby_pre_processor() is defined in crates/oxide/src/extractor/pre_processors/ruby.rs at line 231.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free