HtmlCustomContainerRenderer does not honour EnableHtmlForBlock == false #222

Closed
opened 2026-01-29 14:30:45 +00:00 by claunia · 1 comment
Owner

Originally created by @ghost on GitHub (Sep 10, 2018).

We're building our pipeline with the UseAdvancedExtensions method as part of it and using this pipeline for rendering the same piece of text as both HTML and plaintext. For the plaintext we are setting up a new HtmlRenderer as:

 var renderer = new HtmlRenderer(writer)
                {
                    EnableHtmlForBlock = false,
                    EnableHtmlForInline = false
                };

However any content that 'HtmlCustomContainerRenderer' would pick up (i.e. between nested sets of 3 or more colons) is still rendered out as HTML. Having dug into the source I can see that 'HtmlCustomContainerRenderer' does not honour the 'EnableHtmlForBlock' bool that is set on the renderer, which every other extension we use does.

Any chance of this being honoured in a future release?

Originally created by @ghost on GitHub (Sep 10, 2018). We're building our pipeline with the `UseAdvancedExtensions` method as part of it and using this pipeline for rendering the same piece of text as both HTML and plaintext. For the plaintext we are setting up a new HtmlRenderer as: ``` var renderer = new HtmlRenderer(writer) { EnableHtmlForBlock = false, EnableHtmlForInline = false }; ``` However any content that 'HtmlCustomContainerRenderer' would pick up (i.e. between nested sets of 3 or more colons) is still rendered out as HTML. Having dug into the source I can see that 'HtmlCustomContainerRenderer' does not honour the 'EnableHtmlForBlock' bool that is set on the renderer, which every other extension we use does. Any chance of this being honoured in a future release?
claunia added the enhancementPR Welcome! labels 2026-01-29 14:30:45 +00:00
Author
Owner

@xoofx commented on GitHub (Sep 10, 2018):

Don't remember the details about this, just a send a PR and I will have a look at it.

@xoofx commented on GitHub (Sep 10, 2018): Don't remember the details about this, just a send a PR and I will have a look at it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#222