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

Adding a ZenUML diagram affects rendering of entire page. #18

Closed
armanbilge opened this issue Jul 1, 2023 · 2 comments
Closed

Adding a ZenUML diagram affects rendering of entire page. #18

armanbilge opened this issue Jul 1, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@armanbilge
Copy link

armanbilge commented Jul 1, 2023

Consider this simple HTML page. Adding the ZenUML diagram affects rendering of the <h1> element: the font changes and the text becomes small.

It seems that the <style> added by the JS is affecting the entire page? Am I doing something wrong here?

<!DOCTYPE html>
<html lang="en">

<head>
</head>

<body>
  <h1>H1 Header</h1>

  <pre class="mermaid">
    zenuml
        Alice->John: Hello John, how are you?
        John->Alice: Great!
        Alice->John: See you later!
  </pre>

  <script type="module">
    import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
    import zenuml from 'https://cdn.jsdelivr.net/npm/@mermaid-js/mermaid-zenuml@0.1.0/dist/mermaid-zenuml.esm.min.mjs';
    await mermaid.registerExternalDiagrams([zenuml]);
  </script>
</body>

</html>
@MrCoder MrCoder added the bug Something isn't working label Jul 4, 2023
@MrCoder
Copy link
Collaborator

MrCoder commented Aug 12, 2023

Fixed

@MrCoder MrCoder closed this as completed Aug 12, 2023
@MrCoder
Copy link
Collaborator

MrCoder commented Aug 21, 2023

Fix at mermaid side: mermaid-js/mermaid#4705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants