CrossNox / m2r2

Markdown to reStructuredText converter
https://crossnox.github.io/m2r2
MIT License
107 stars 26 forks source link

Enhancement to support Github style callouts #65

Open raven42 opened 8 months ago

raven42 commented 8 months ago

Would it be possible to add support for github style callouts in markdown and have them render as sphinx admonitions?

Currently if I have a markdown document defined like this:

# Some Section

Some paragraph

> :warning: Some warning message

On github markdown, it renders like this with the 'warning' icon:

Some Section

Some paragraph

⚠️ Some warning message

However when using the m2r2 to convert the markdown, it treats this as a parameter listing like this:

Some section
============

Some paragraph

..

   :warning: Some warning message

Which in the sphinx compiled html output, it renders like this: image

Ideally it would be nice if this could support github style callouts like this and render it as a sphinx warning/note/etc directive instead like this:

Some section
============

Some paragraph

.. warning::

   Some warning message

image