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 e6457913_2ef0_e7c2_ec73_30bf4ec517c6["get_candidates_with_positions()"] d43275d0_f361_9635_6e40_80b1b171c854["lib.rs"] e6457913_2ef0_e7c2_ec73_30bf4ec517c6 -->|defined in| d43275d0_f361_9635_6e40_80b1b171c854 style e6457913_2ef0_e7c2_ec73_30bf4ec517c6 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
Defined In
Source
Frequently Asked Questions
What does get_candidates_with_positions() do?
get_candidates_with_positions() is a function in the tailwindcss codebase, defined in crates/node/src/lib.rs.
Where is get_candidates_with_positions() defined?
get_candidates_with_positions() is defined in crates/node/src/lib.rs at line 136.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free