Skip to content

Commit 632981a

Browse files
committed
fix rendering of Mermaid SVGs
1 parent 31b9e55 commit 632981a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

obsidian.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,19 @@ export async function wrapInReveal(reveal, req) {
14691469
flex: 1 1 0;
14701470
min-width: 0;
14711471
}
1472+
1473+
pre.mermaid {
1474+
width: fit-content;
1475+
margin: 0 auto;
1476+
background-color: #c3c3c3;
1477+
padding: 1em;
1478+
border-radius: 6px;
1479+
text-align: center;
1480+
}
1481+
pre.mermaid svg {
1482+
vertical-align: top;
1483+
}
1484+
14721485
</style>
14731486
<link rel="stylesheet" href="/obsidian-page.css">
14741487
<link rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon" />

0 commit comments

Comments
 (0)