func render_documentation(documentation: &[String], heading_offset: Int, module: &String, owner: &String, current_page: &String, symbols: &[SymbolLink]) -> StringParses documentation Markdown, autolinks resolvable code spans, and renders HTML.
Explicit links and code blocks are preserved. A code span becomes a link only when owner, module, and package lookup identify exactly one declaration; unresolved or ambiguous spans remain ordinary code.
View Source
pub func render_documentation(documentation: &[String], heading_offset: Int, module: &String, owner: &String, current_page: &String, symbols: &[SymbolLink]) -> String {
if documentation.is_empty() { return "" }
let markdown = join_strings(parts: documentation, separator: "\n")
let document = parse(markdown: markdown, extensions: [])
let blocks = linked_blocks(values: document.blocks, module: module, owner: owner, current_page: current_page, symbols: symbols)
let output = StringBuilder()
for block in blocks {
output.append(string: block.to_string_with_heading_offset(heading_offset: heading_offset))
}
output.finish()
}