ldoc-markup
Escape text and render a bounded safe Markdown and structured EDoc subset for the static HTML reference.
escape/1function
escape/1Escape HTML-special characters in caller-supplied UTF-8 TEXT for safe text or quoted-attribute placement.
The input is returned as an escaped binary. This is not a UTF-8 validator, URL sanitizer, or redactor; callers must establish the input boundary.
render/2function
render/2Render VALUE according to FORMAT using the supported safe documentation subset.
UTF-8 Markdown supports documented common blocks and inline forms; unsupported Markdown remains readable text and raw HTML is escaped. Structured application/erlang+html values are checked against the allowlisted node/attribute tree. Unknown native formats are safely printed and escaped. Success returns {ok, HtmlBinary}; invalid UTF-8 Markdown or invalid structured EDoc returns {error, invalid_documentation}. No full CommonMark, raw HTML execution, or remote asset fetching is provided.