Skip to main content

find_inline_cites

Function find_inline_cites 

Source
pub fn find_inline_cites(text: &str) -> Vec<(usize, usize, CiteRef)>
Expand description

Scan text for inline citations: [@key], [@key, p. 12], [@key1; @key2].

Returns (start_byte, end_byte, CiteRef) tuples in document order. A bracket group qualifies only when its first non-space character is @. Within a group, items are separated by ;; each item is @key optionally followed by , <locator>. Keys are runs of [A-Za-z0-9_:.-].