hunyadi / md2conf

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

warning and notes appear to render incorrectly #25

Closed joes-myob closed 9 months ago

joes-myob commented 9 months ago

I just published a test page

!!! info "optional explicit title within double quotes"
    Any number of other indented markdown elements.

    This is the second paragraph.

!!! warning
    You should note that the title will be automatically capitalized.

!!! tip
    You should note that the title will be automatically capitalized.

!!! note
    "Don't try this at home"
    ...

Appears to render in confluence as

image

I'd expect the note to render as image

warning to be image

And error to be image

hunyadi commented 9 months ago

Unfortunately, I am no expert in Confluence. The utility md2conf translates Markdown admonitions info, tip, note and warning into Confluencestructured-macro instances of the same name attribute. Specifically, the note macro gets the exclamation mark in a triangle, and the warning macro gets the X in a circle. This is how these get rendered by our managed Confluence:

admonitions

This is the Markdown source for the above image:

!!! info
    This is an information panel.

!!! info "Optional explicit title"
    This is an information panel with an explicit title.

    This is the second paragraph.

!!! tip "Tip of the day"
    This is a structured macro panel showing a tip.

!!! note "A note"
    This is a structured macro panel showing a note.

!!! warning "A warning message"
    This is a structured macro panel showing a warning.

The strange rendering for "optional explicit title within double quotes" in your case might be attributable to a less recent version of Python-Markdown. Does it help if you update dependencies?

python3 -m pip install --upgrade markdown types-markdown pymdown-extensions
joes-myob commented 9 months ago

Thanks for the reply Tried updating the dependencies - seems like a similar result.

Will close this issue. thanks