process() — tailwindcss Function Reference
Architecture documentation for the process() function in elixir.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD a46f6e4c_01c3_320e_0cce_fae2a64e2948["process()"] 2512c3cb_e625_2618_a8de_488cdc04e632["elixir.rs"] a46f6e4c_01c3_320e_0cce_fae2a64e2948 -->|defined in| 2512c3cb_e625_2618_a8de_488cdc04e632 style a46f6e4c_01c3_320e_0cce_fae2a64e2948 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/oxide/src/extractor/pre_processors/elixir.rs lines 9–64
fn process(&self, content: &[u8]) -> Vec<u8> {
let mut cursor = cursor::Cursor::new(content);
let mut result = content.to_vec();
let mut bracket_stack = BracketStack::default();
while cursor.pos < content.len() {
// Look for a sigil marker
if cursor.curr != b'~' {
cursor.advance();
continue;
}
// Scan charlists, strings, and wordlists
if !matches!(cursor.next, b'c' | b'C' | b's' | b'S' | b'w' | b'W') {
cursor.advance();
continue;
}
cursor.advance_twice();
// Match the opening for a sigil
if !matches!(cursor.curr, b'(' | b'[' | b'{') {
continue;
}
// Replace the opening bracket with a space
result[cursor.pos] = b' ';
// Scan until we find a balanced closing one and replace it too
bracket_stack.push(cursor.curr);
while cursor.pos < content.len() {
cursor.advance();
match cursor.curr {
// Escaped character, skip ahead to the next character
b'\\' => cursor.advance_twice(),
b'(' | b'[' | b'{' => {
bracket_stack.push(cursor.curr);
}
b')' | b']' | b'}' if !bracket_stack.is_empty() => {
bracket_stack.pop(cursor.curr);
if bracket_stack.is_empty() {
// Replace the closing bracket with a space
result[cursor.pos] = b' ';
break;
}
}
_ => {}
}
}
}
result
}
Domain
Subdomains
Source
Frequently Asked Questions
What does process() do?
process() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/pre_processors/elixir.rs.
Where is process() defined?
process() is defined in crates/oxide/src/extractor/pre_processors/elixir.rs at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free