Home / Function/ get_candidates_with_positions() — tailwindcss Function Reference

get_candidates_with_positions() — tailwindcss Function Reference

Architecture documentation for the get_candidates_with_positions() function in lib.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  c2b05b39_1e20_1ddb_5798_731d42025ea5["get_candidates_with_positions()"]
  b4753452_877e_045a_5e9b_0da9561dcac2["get()"]
  c2b05b39_1e20_1ddb_5798_731d42025ea5 -->|calls| b4753452_877e_045a_5e9b_0da9561dcac2
  style c2b05b39_1e20_1ddb_5798_731d42025ea5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/node/src/lib.rs lines 136–161

  pub fn get_candidates_with_positions(
    &mut self,
    input: ChangedContent,
  ) -> Vec<CandidateWithPosition> {
    let content = input.content.unwrap_or_else(|| {
      std::fs::read_to_string(input.file.unwrap()).expect("Failed to read file")
    });

    let input = ChangedContent {
      file: None,
      content: Some(content.clone()),
      extension: input.extension,
    };

    let mut utf16_idx = IndexConverter::new(&content[..]);

    self
      .scanner
      .get_candidates_with_positions(input.into())
      .into_iter()
      .map(|(candidate, position)| CandidateWithPosition {
        candidate,
        position: utf16_idx.get(position),
      })
      .collect()
  }

Domain

Subdomains

Calls

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free