Skip to main content

hyperref_target

Function hyperref_target 

Source
pub fn hyperref_target(node: &NodeRef<'_, Flm>) -> Option<RefTargetText>
Expand description

The target of a \hyperref node (the label written in the brackets) as characters with the whitespace around it trimmed, and the label when that text is spelled type:label.

None when the node is not a \hyperref, or when its target holds a placeholder of a user definition’s template that was not expanded: such a target has no text to read, declares no site, and nothing is reported for it.

The brackets are an optional argument parsed as FLM code and kept as typed, so a target that is not made of characters (a command, a special character such as ~) reads as the empty text, and so does an absent argument (\hyperref{text}). The empty text is not a label: the label scan (SCAN) reports it, and the reference is shown unresolved. See the module documentation.