User processed link references in Markdig?

205 views Asked by At

When compiling Markdown to HTML, I need to support something like [`C`] which refers to a language's item in the scope. If a link reference doesn't exist, it should solve to an item in my language.

I gave a look at MarkdownPipelineBuilder, but found no way to specify a custom processor for these links. This is all MarkdownPipeline has of public:

BlockParsers
InlineParsers
Extensions
PreciseSourceLocation
DebugLog
TrackTrivia
DocumentProcessed
Build

I think the internal LinkInlineParser.ProcessLinkReference is relevant for a fork. How would I change it so I can pass a callback that is executed when a link is not found?

0

There are 0 answers