hunyadi / md2conf

Publish Markdown files to Confluence wiki
MIT License
52 stars 27 forks source link

Support "Info Panel" (incl. all other derivates) in text #17

Closed jloeser closed 1 year ago

jloeser commented 1 year ago

We already use an Info Panel for the generated-by message at the very top of the document.

Could we enable this feature also in the normal text including its derivatives ("Note", "Success", "Warning", "Error")?

The current notation I am using in Markdown for such boxes (there is no concept of "Info Panels" in Markdown) is:

Normal text.

> **_NOTE:_**
> This is my Note. There can be **many** lines.
> Last one is this one.

Normal text.
hunyadi commented 1 year ago

Python-Markdown defines a syntax for admonitions. Under the hood, md2conf uses Python-Markdown for parsing documents. If we use the Python-Markdown syntax for admonitions, it would be relatively easy to convert them into Confluence info panels.

hunyadi commented 1 year ago

Converting rST-style admonitions defined with the Python-Markdown syntax into Confluence structured macro panels has been implemented in the latest master, and will be released as md2conf version 0.1.9 in PyPI once it is confirmed that it works as by design.