Markdown Postprocessor Plugins API

I’m trying to make a plugin that adds a small lang extension to the markdown postprocessor. This can’t be integrated onto the default logseq processor because it’s not a standard extension.

I know that onBlockRendererSlotted exists, but it needs raw HTML, but I’d need to process somehow the Markdown into HTML with some kind of external dependencies. Shouldn’t this be logseq’s job?

Furthermore, onBlockRendererSlotted is for changing how a certain block is rendered (it needs a uuid), I don’t know if it is suited for every block in a page.

I propose some method that allows plugin developers to post-process the html output generated by the default markdown renderer.

This has a lot of potential for plugin developers!

  • Making a plugin to render emojis using shortcodes :es: [Feature Request]
  • Making a plugin to modify some strings before rendering, like replacing -- with an en dash (–) and — with em dash (---) [Feature request].
  • Making a plugin to make writting furigana easier: {漢字|かんじ} => 漢字かんじ
  • Supporting subscript: H~2~O => H2O, and superscript: x^2^ => x2 without math mode