Preprocessing markdown text

Preprocessor
The method registerMarkdownPostProcessor allows me to capture the markdown text that has been rendered into HTML and modify it before it’s displayed to the user. That’s great. However, I would like to capture and modify the markdown text before it gets passed to the renderer—something like a registerTextPreProcessor. But I can’t seem to figure that out. Can anyone help? Thank you.

2 Likes

Ideally it should be something like markdown-it plugins that hook into the parsing process. Having each plugin re-read the entire document start to finish would be very inefficient and quickly add up as you install more plugins.

With parser plugins it would be possible to implement, for example, deflist yourself instead of hoping it would one day be added into core obsidian.

1 Like