miyakogi/m2r

Make RestRenderer.hmarks not hardcoded

Opened this issue · 0 comments

I'm trying to refactor the Jupyterlab docs to use mdinclude as part of jupyterlab/jupyterlab#8246. Our current rst header mark scheme does not match the hardcoded one in m2r, and it's proving to be a pain point. Rather than having to write crazy looking regexes (eg (?<=^~*)~(?!\s\S+)) to replace my header marks, it would be much nicer if I could just configure m2r.

I'm happy to submit a PR for this. Before I jump in and work on it though, I'd like to clarify: is there a reason why the header marks in RestRenderer.hmarks are hardcoded? Or can they just be set freely?