mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-09 13:56:56 +00:00
Is there a way to disable an extension? #228
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 @JeanCollas on GitHub (Oct 1, 2018).
If we have a "standard" way to create a pipeline, is there a way to remove one or several extensions from this pipeline depending on the context?
For example in some contexts, we may not want to process links.
2nd question linked to the first one, but different :)
Is there an extension that removes links? (for example to forbid totally/censor links in comments)
It would be similar to the http* auto-link, but just making it disappear (we can think of the same for phone numbers, emails etc).
@xoofx commented on GitHub (Oct 7, 2018):
Default CommonMark behavior can be disabled by manipulating the registered InlineParsers and BlockParsers directly on the
MarkdownPipelineBuilderNote that there are quite a few cases where removing a parser can make the pipeline invalid (because there are still a few parser dependencies that are not resolved dynamically, but should, PR welcome for this change)
No. But you can either iterate on the resulting markdown document before rendering to HTML... you can try also to remove entirely the parser for them (but note that they would appear as plain text in the output)