Closed neongreen-sc closed 1 month ago
For now my workaround is to disable mermaid processing in confluencebuilder and process <mermaid>
nodes in a separate pass.
Does the confluence_permit_raw_html
option work for this use case?
Without confluence_permit_raw_html
: confluencebuilder's mermaid override kicks in and says that it can't run mmdc
.
With confluence_permit_raw_html
and confluence_adv_restricted = ["ext-sphinxcontrib.mermaid"]
: mermaid nodes aren't touched at all and we end up with "unknown node type: mermaid".
I haven't tried with confluence_permit_raw_html
but without confluence_adv_restricted
-- is it supposed to work? I would guess not.
Sorry, I was under the assumption that you may have already hooked into sphinxcontrib-mermaid's implementation to have the HTML content generated for you. If you did something like this:
from sphinxcontrib.mermaid import html_visit_mermaid
from sphinxcontrib.mermaid import mermaid
...
def setup(app: Sphinx):
app.add_node(mermaid, confluence=(html_visit_mermaid, None))
This could inject HTML into the body document that may work with confluence_adv_restricted
enabled.
Changes from #1037 should help support this through a new confluence_mermaid_html_macro
option.
v2.7 is now available on PyPI -- marking as closed.
I work in an environment where
mermaid-cli
is tricky to install.However, our Confluence Server instance has HTML enabled, and for Mermaid blocks we can simply output smth like:
This would be great to support natively.