Skip to main content

rewrite_inline_definitions

Function rewrite_inline_definitions 

Source
pub fn rewrite_inline_definitions(
    text: &str,
    name_for: impl FnMut(&str) -> Option<String>,
) -> String
Expand description

Rewrite each inline definition in an op field’s text as a reference: {{expr}}, {:=expr}, {:=expr:=} and a {expr} group classify_group reads as an expression each become {name}, where name is what name_for answers for the expression. A definition name_for has no name for, and everything else, is kept as written, escaped braces included.