Home / Function/ drop_covered_spans() — tailwindcss Function Reference

drop_covered_spans() — tailwindcss Function Reference

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

Function rust OxideCore Extractor calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  4f8e94b3_3738_d6ce_d93e_5eec85fa053f["drop_covered_spans()"]
  2a34bbb8_098e_f736_c9a4_821aa310393f["extract()"]
  2a34bbb8_098e_f736_c9a4_821aa310393f -->|calls| 4f8e94b3_3738_d6ce_d93e_5eec85fa053f
  0d2f4bc0_2b1b_fd72_0ffc_954eed604d0a["push()"]
  4f8e94b3_3738_d6ce_d93e_5eec85fa053f -->|calls| 0d2f4bc0_2b1b_fd72_0ffc_954eed604d0a
  style 4f8e94b3_3738_d6ce_d93e_5eec85fa053f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/mod.rs lines 213–231

fn drop_covered_spans(mut spans: Vec<Span>) -> Vec<Span> {
    if spans.len() <= 1 {
        return spans;
    }

    spans.sort_by(|a, b| a.start.cmp(&b.start).then(b.end.cmp(&a.end)));

    let mut result = Vec::with_capacity(spans.len());
    let mut max_end = None;

    for span in spans {
        if max_end.is_none_or(|end| span.end > end) {
            result.push(span);
            max_end = Some(span.end);
        }
    }

    result
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does drop_covered_spans() do?
drop_covered_spans() is a function in the tailwindcss codebase.
What does drop_covered_spans() call?
drop_covered_spans() calls 1 function(s): push.
What calls drop_covered_spans()?
drop_covered_spans() is called by 1 function(s): extract.

Analyze Your Own Codebase

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

Try Supermodel Free