Module type Odoc_extension_api.Code_Block_ExtensionSource
The signature that code block extensions must implement
The language prefix this extension handles. E.g., "dot" handles {@dot[...]}, "mermaid" handles {@mermaid[...]}
Source
val to_document :
Odoc_extension_api.code_block_meta ->
string ->
Odoc_extension_api.extension_output optionTransform a code block. Takes metadata and code content. Returns Some output to replace the code block, or None to fall back to default rendering.
Example metadata for {\@dot width=500 format=svg[digraph \{...\}]}:
meta.language = "dot"meta.tags = [`Binding ("width", "500"); `Binding ("format", "svg")]- content = "digraph {...}"