Skip to main content

field_map

Function field_map 

Source
pub fn field_map(ctx: &LintContext<'_>) -> Vec<Option<String>>
Expand description

The lowercased top-level frontmatter key owning each line, indexed by line number. None where no owner is determinable, which leaves the line checked.

Attribution is a heuristic. It is deliberately biased so an uncertain line falls back to being checked: an indent-0 YAML key line always starts a new key, so a bracket inside a block scalar can never cause a later real key to be suppressed. The cost is that an indent-0 flow continuation is attributed to its own text rather than to its parent.