Fix detection of mermaid objects
This commit is contained in:
parent
63f57fbc12
commit
289ce1263d
2 changed files with 3 additions and 4 deletions
|
@ -16,7 +16,6 @@
|
|||
theme: initTheme /* <default|dark|forest|neutral> */
|
||||
};
|
||||
|
||||
|
||||
/* Markdown converts to HTML */
|
||||
$("pre").has("code.language-mermaid").each(function() {
|
||||
let svgCode = $(this).children().html();
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
static get LIGHT_MODE() { return "light"; }
|
||||
|
||||
constructor() {
|
||||
if (this.mode != null) {
|
||||
if (this.mode == ModeToggle.DARK_MODE) {
|
||||
if (this.hasMode) {
|
||||
if (this.isDarkMode) {
|
||||
if (!this.isSysDarkPrefer) {
|
||||
this.setDark();
|
||||
}
|
||||
|
@ -92,7 +92,7 @@
|
|||
}
|
||||
|
||||
updateMermaid() {
|
||||
if (mermaid !== undefined) {
|
||||
if (typeof mermaid !== "undefined") {
|
||||
let expectedTheme = (this.modeStatus === ModeToggle.DARK_MODE? "dark" : "default");
|
||||
let config = { theme: expectedTheme };
|
||||
|
||||
|
|
Loading…
Reference in a new issue