mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
HtmlInlineRenderer escape #597
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GilbertoTheMighty on GitHub (Apr 8, 2023).
Default implementation not using
EnableHtmlEscapeinHtmlInlineRendererandHtmlBlockRenderer. I have a markdown like this:After default Markdown.ToHtml()
<Command>is not escaped.So I have to do a custom
HtmlInlineRendererthat doesrenderer.WriteEscapeWhy HtmlRenderer is not reusable? I would like to have a class member render to reuse it on each incoming text instead of creating 4 objects each time:
It would be nice to have
Render.Reset()@xoofx commented on GitHub (Apr 22, 2023):
Don't remember the details about this, but PR welcome if you want this to be fixed.
You can keep a reference to a single HtmlRenderer (at least per thread) and reset the backend
StringWriter(as long as you use it with the same render pipeline...etc.), so I would think that it is somehow reusable in some ways.