This repository was archived by the owner on May 29, 2026. It is now read-only.
Commit 060ddd4
authored
fix: revert @muyajs/core to 0.0.39 to unblock Features/Themes preview (#103)
@muyajs/core@0.1.0 ships its mermaid integration as separate ESM chunks
that have a circular import between chunk-5ZQYHXKU and mermaid.core. The
consumer chunk runs `var Ie = pe()` at module init while `pe` (the
default-export of mermaid.core, lazily wrapped through the `t` helper)
hasn't been assigned yet, so it throws `TypeError: pe is not a function`
inside MarkdownToHtml.renderHtml(). The promise rejects and both
Feature.tsx and Theme.tsx fall into their `.catch` branches, rendering
"Error rendering content" / "Error rendering theme content" on the live
site (https://marktext.me) and any local build using 0.1.0.
Revert PR #99 to restore @muyajs/core@^0.0.39, the explicit `mermaid`
dependency, and the existing `rewrapMermaidSource` + manual
`mermaid.run()` workaround for 0.0.39's walkTokens accumulation bug.
Re-upgrade once @muyajs/core ships a release that fixes the circular
chunk init.
This reverts commit aae5452.1 parent f2d3a2f commit 060ddd4
5 files changed
Lines changed: 257 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
48 | 81 | | |
49 | 82 | | |
50 | 83 | | |
| |||
61 | 94 | | |
62 | 95 | | |
63 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
64 | 104 | | |
65 | 105 | | |
66 | 106 | | |
| |||
91 | 131 | | |
92 | 132 | | |
93 | 133 | | |
94 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
95 | 138 | | |
96 | 139 | | |
97 | 140 | | |
| |||
0 commit comments