Skip to main content

build_nonterminal_map

Function build_nonterminal_map 

Source
pub(crate) fn build_nonterminal_map(book: &Book) -> HashMap<String, String>
Expand description

Scans all chapters for headings matching ## `Nonterminal` definition and builds a map from nonterminal name to relative URL for cross-chapter linking.

💡 The heading convention is ## `Function` definition which mdbook generates as an anchor like #function-definition. For cross-chapter links, we also need the chapter’s path (e.g., syntax/items.html).