mgaitan/sphinxcontrib-mermaid

Add distinct CSS class to `<img>` tags

astrojuanlu opened this issue · 0 comments

I see that a custom class is being added when the HTML builder is in use:

if "align" in node:
tag_template = """<div align="{align}" class="mermaid align-{align}">
{code}
</div>
"""
else:
tag_template = """<div class="mermaid">
{code}
</div>"""

However, the PNG builder does not add any. The code is ready for it:

imgcss = imgcls and f'class="{imgcls}"' or ""

But it's never being used:

def html_visit_mermaid(self, node):
render_mm_html(self, node, node["code"], node["options"])