diff --git a/sphinxcontrib/mermaid.py b/sphinxcontrib/mermaid.py index ccec878..7ebbb76 100644 --- a/sphinxcontrib/mermaid.py +++ b/sphinxcontrib/mermaid.py @@ -285,20 +285,14 @@ def render_mm_html(self, node, code, options, prefix="mermaid", imgcls=None, alt if alt is None: alt = node.get("alt", self.encode(code).strip()) imgcss = imgcls and f'class="{imgcls}"' or "" - if _fmt == "svg": - svgtag = f""" -

{alt}

-""" - self.body.append(svgtag) - else: - if "align" in node: - self.body.append( - '
' % (node["align"], node["align"]) - ) + if "align" in node: + self.body.append( + '
' % (node["align"], node["align"]) + ) - self.body.append(f'{alt}\n') - if "align" in node: - self.body.append("
\n") + self.body.append(f'{alt}\n') + if "align" in node: + self.body.append("
\n") raise nodes.SkipNode