Skip to main content

label_context

Function label_context 

Source
pub fn label_context(
    root: &SyntaxNode,
    offset: TextSize,
) -> Option<LabelContext>
Expand description

Classify the \label whose key sits at offset: the innermost classifying ancestor wins (float/theorem/math/list environment), matching how the label resolves in TeX; a label in plain prose falls back to the nearest preceding sectioning command. None in unclassifiable plain text before any section.