Home / Function/ matched_stripped() — tailwindcss Function Reference

matched_stripped() — tailwindcss Function Reference

Architecture documentation for the matched_stripped() function in gitignore.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  b251a053_a225_283e_4364_2e73be18bf20["matched_stripped()"]
  8ec5ccab_4c41_0d11_dfea_bf7d548be815["matched()"]
  8ec5ccab_4c41_0d11_dfea_bf7d548be815 -->|calls| b251a053_a225_283e_4364_2e73be18bf20
  73d594dd_e22d_f2c0_a6a6_f44c8bc42078["matched_path_or_any_parents()"]
  73d594dd_e22d_f2c0_a6a6_f44c8bc42078 -->|calls| b251a053_a225_283e_4364_2e73be18bf20
  39e475ea_b9d2_0858_b175_c71a0421de7a["is_empty()"]
  b251a053_a225_283e_4364_2e73be18bf20 -->|calls| 39e475ea_b9d2_0858_b175_c71a0421de7a
  4f3b6109_9f8c_14ca_8dcb_355cdeeb7930["is_only_dir()"]
  b251a053_a225_283e_4364_2e73be18bf20 -->|calls| 4f3b6109_9f8c_14ca_8dcb_355cdeeb7930
  813d5637_f8a4_3663_d30e_795a6435a984["is_whitelist()"]
  b251a053_a225_283e_4364_2e73be18bf20 -->|calls| 813d5637_f8a4_3663_d30e_795a6435a984
  style b251a053_a225_283e_4364_2e73be18bf20 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/gitignore.rs lines 246–269

    fn matched_stripped<P: AsRef<Path>>(&self, path: P, is_dir: bool) -> Match<&Glob> {
        if self.is_empty() {
            return Match::None;
        }
        // CHANGED: Rules marked as only_on_files can not match against directories.
        if self.only_on_files && is_dir {
            return Match::None;
        }
        let path = path.as_ref();
        let mut matches = self.matches.as_ref().unwrap().get();
        let candidate = Candidate::new(path);
        self.set.matches_candidate_into(&candidate, &mut *matches);
        for &i in matches.iter().rev() {
            let glob = &self.globs[i];
            if !glob.is_only_dir() || is_dir {
                return if glob.is_whitelist() {
                    Match::Whitelist(glob)
                } else {
                    Match::Ignore(glob)
                };
            }
        }
        Match::None
    }

Subdomains

Frequently Asked Questions

What does matched_stripped() do?
matched_stripped() is a function in the tailwindcss codebase.
What does matched_stripped() call?
matched_stripped() calls 3 function(s): is_empty, is_only_dir, is_whitelist.
What calls matched_stripped()?
matched_stripped() is called by 2 function(s): matched, matched_path_or_any_parents.

Analyze Your Own Codebase

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

Try Supermodel Free