Preprocessing markdown text

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.