question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Collapsed admonitions does not display mermaid properly

See original GitHub issue

Do not know if this problem is in this plugin or in admonitions. But collapsible admonitions (that are already closed) only shows a small rectangle.

!!! note "This Works
    ```mermaid
    graph TD
    A[Client] --> B[Load Balancer]
    ```
???+ note "This Also"
    ```mermaid
    graph TD
    A[Client] --> B[Load Balancer]
    ```
??? note "But not this"
    ```mermaid
    graph TD
    A[Client] --> B[Load Balancer]
    ```

HTML output

I’m no expert in HTML, but I believe the main problem is the size. Output for the two last examples:

<svg id="mermaid-1597753460847" width="187.546875" xmlns="http://www.w3.org/2000/svg" height="181" viewBox="0 0 187.546875 181">
<svg id="mermaid-1597753460911" width="16" xmlns="http://www.w3.org/2000/svg" height="16" viewBox="-8 -8 16 16">

PS: Tried this with the original plugin and it didn’t work.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:71 (30 by maintainers)

github_iconTop GitHub Comments

2reactions
fralaucommented, Sep 7, 2020

@AndersSteenNilsen To make it clear, the collapsed “admonition” now works correctly with the diagram, providing one follows the instructions.

Collapsed

Uncollapsed

1reaction
facelessusercommented, Aug 21, 2020

Notice the last screenshot, it can accept configs just like before. It’ll call initialize on those configs. In the example above it default is the config. So we set the forest theme on that page. Default relates to schemes, so it is the config for the default scheme. For most people, that would be what they define, it’s mainly done this way so I can toggle light and dark mode at some point.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Admonition plugin - #39 by Cajun - Obsidian Forum
FYI: mermaid works for me because it is a normal code block and the export doesn't change it. And mkdocs is so smart...
Read more >
Mermaid Diagrams not Properly Rendering in Snippets - GitLab
When editing the description of a snippet, the preview button does properly render the markdown diagrams.
Read more >
Changelog - Material for MkDocs - GitHub Pages
Adjusted CSS to better allow for custom primary and accent colors; Fixed #4620: Primary color is not applied (8.5.9 regression) ...
Read more >
Style Guide - Sumo Logic Docs
Protecting our patents and trademarks is important to do correctly. We don't want to expose the company to a loss of trademark or...
Read more >
Shape Texts In Mermaid Are Not Showing Correctly
Width of Shapes seems to be to short and not able to show full texts inside. Example: Markdown code: # Content Removal. ###...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found