gomarkdown / markdown

markdown parser and HTML renderer for Go
Other
1.36k stars 171 forks source link

Support for external code renderers #284

Closed AndreRenaud closed 1 year ago

AndreRenaud commented 1 year ago

Is there any future intention to support external renders for code blocks, like Mermaid or Wavedrom? ie:

  ```mermaid
    graph TD;
        A-->B;
        A-->C;
        B-->D;
        C-->D;
  ```

which should use the mermaid tool to produce a PNG/SVG and embed that into the result?

If not, is this kind of feature something that would be accepted as a PR, or is it out-of-scope for the project?

Thanks for this library - it is very simple and easy to use.

AndreRenaud commented 1 year ago

Sorry for the noise on this - html.RendererOptions.RenderNodeHook appears to be what I was looking for.