renderHtmlWithDiagnostics
本頁內容尚未翻譯。
renderHtmlWithDiagnostics(
source,options?):MdiRenderResult<string>
Defined in: mdi/src/index.ts:206
Render HTML while retaining the Rust parser result that made the semantic
decisions. Use this in editors: warnings and source spans remain available
instead of being silently discarded, and headings can drive navigation or
chapter controls without scraping generated HTML.
The low-level Rust ABI currently accepts source for rendering, rather than a serializable IR handle. This helper therefore validates with the same Rust parser immediately before rendering and returns that exact parse result.
Parameters
Section titled “Parameters”source
Section titled “source”string
options?
Section titled “options?”Returns
Section titled “Returns”MdiRenderResult<string>