pub(crate) fn render_ebnf_blocks(
content_lines: &[String],
nt_map: &HashMap<String, String>,
current_source: Option<&Path>,
) -> Vec<String>Expand description
Converts markdown ```ebnf ``` code fences into HTML <pre> blocks with linked nonterminals.
Within EBNF blocks:
- PascalCase words that exist in
nt_mapbecome<a>links to their definition - Backtick-quoted terminals become
<code class="ebnf-t">spans
💡 Links are made relative to the current chapter. If the nonterminal is defined
in a different chapter, we compute a relative path; if same chapter, just #anchor.