pub fn render_to_string(input: &str, options: &Options<'_>) -> RenderedExpand description
Render afm source text to HTML.
One-stop entry point for the typical caller (afm CLI, afm-epub). Internally:
- [
aozora_pipeline::lex_into_arena] turns the source into a normalized text (with PUA sentinels at every Aozora construct) plus a borrowedRegistry. comrak::parse_document+comrak::format_htmlruns against the normalized text — sentinels flow through as plain text since they are not in CommonMark’s escape set (</>/&/").- The internal
post_processmodule sweeps the produced HTML, substituting each sentinel with the matchingaozora_render::render_nodeoutput.
§Panics
Panics if comrak::format_html fails to write into the internal
String sink — String cannot fail as a fmt::Write, so this
branch is unreachable in normal use.