-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability for extensions to define an AST processor #207
Comments
I proposed a similar functionality in #106. |
Yeah I'd like to do something similar to #106, where multiple "visitors" can be defined, and they modify the AST in between the parsing and rendering steps. The main difference is that each "visitor" will be passed the document root |
For clarification, I'd like the implementation to look something like this:
Very similar to how inline processors work, except each "AST processor" (or "AST filter", if you prefer that name) operates on the root-level |
And to further clarify: I'd like to see if we can remove inline processors and have them use this new approach instead. |
(Removed |
The process of converting Markdown to HTML is basically two steps:
Users can manually add a third step in the middle to modify the AST before it is rendered. However, it's currently impossible to insert an AST processor via the extension functionality.
I'd therefore like to add support for this within the extensions.
Now, we do have something called inline processors which are executed at the very end of that first step. It's geared towards processing inline AST elements, but perhaps we can make this more generalized?
The text was updated successfully, but these errors were encountered: