Using context for extensions #657

Open
opened 2026-01-29 14:42:16 +00:00 by claunia · 4 comments
Owner

Originally created by @leotsarev on GitHub (Mar 5, 2024).

When my extension is rendering, it needs access to MarkdownParserContext.
Now I has to pass context through Inline objects, and i don't like it.
Is there way to extension to access it?

Originally created by @leotsarev on GitHub (Mar 5, 2024). When my extension is rendering, it needs access to MarkdownParserContext. Now I has to pass context through Inline objects, and i don't like it. Is there way to extension to access it?
claunia added the enhancementPR Welcome! labels 2026-01-29 14:42:16 +00:00
Author
Owner

@xoofx commented on GitHub (Mar 14, 2024):

As per the name MarkdownParserContext, it was added for accessing it from parsing. It should be possible to modify the code to have this context passed around. We might have to rename it though (e.g MardownContext or something)

@xoofx commented on GitHub (Mar 14, 2024): As per the name `MarkdownParserContext`, it was added for accessing it from parsing. It should be possible to modify the code to have this context passed around. We might have to rename it though (e.g `MardownContext` or something)
Author
Owner

@leotsarev commented on GitHub (Mar 15, 2024):

We might have to rename it though (e.g MardownContext or something)
It would be a breaking change...

@leotsarev commented on GitHub (Mar 15, 2024): >We might have to rename it though (e.g MardownContext or something) It would be a breaking change...
Author
Owner

@xoofx commented on GitHub (Mar 15, 2024):

It would be a breaking change...

Markdig is not 1.0, so we don't make a promise about not making breaking changes.

@xoofx commented on GitHub (Mar 15, 2024): > It would be a breaking change... Markdig is not 1.0, so we don't make a promise about not making breaking changes.
Author
Owner

@xoofx commented on GitHub (Mar 15, 2024):

But that doesn't mean that we can't find a solution that provide backward compatibility. If there is a path, that's better for sure. 🙂

@xoofx commented on GitHub (Mar 15, 2024): But that doesn't mean that we can't find a solution that provide backward compatibility. If there is a path, that's better for sure. 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#657