Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add distinct CSS class to <img> tags #121

Open
astrojuanlu opened this issue May 10, 2023 · 0 comments
Open

Add distinct CSS class to <img> tags #121

astrojuanlu opened this issue May 10, 2023 · 0 comments

Comments

@astrojuanlu
Copy link

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"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant