浏览代码

Fixed Mermaid Diagram error: Maximum call stack size exceeded.

Thanks to xet7 !

Fixes #4251
Lauri Ojansivu 3 年之前
父节点
当前提交
443b40cff3
共有 4 个文件被更改,包括 4857 次插入18 次删除
  1. 3 3
      CHANGELOG.md
  2. 4839 1
      package-lock.json
  3. 13 11
      package.json
  4. 2 3
      packages/markdown/src/template-integration.js

+ 3 - 3
CHANGELOG.md

@@ -18,11 +18,11 @@ and adds the following new features:
 - [New admin report to list boards](https://github.com/wekan/wekan/pull/4252).
 - [New admin report to list boards](https://github.com/wekan/wekan/pull/4252).
   Thanks to jrsupplee.
   Thanks to jrsupplee.
 
 
-and removes the following features:
+and fixes the following bugs:
 
 
-- Temporarily remove Mermaid Diagram because even after updating to newest Mermaid it still has bug at https://github.com/wekan/wekan/issues/4251.
+- Fixed Mermaid Diagram error: Maximum call stack size exceeded.
   [Part 1](https://github.com/wekan/wekan/commit/23a403644c7db44392d4b0498ee0fc85c504d974),
   [Part 1](https://github.com/wekan/wekan/commit/23a403644c7db44392d4b0498ee0fc85c504d974),
-  [Part 2](https://github.com/wekan/wekan/commit/998d2f5b445b6bf2bc6cd16beac7231a0cf94fc3).
+  [Part 2](https://github.com/wekan/wekan/commit/998d2f5b445b6bf2bc6cd16beac7231a0cf94fc3),
   Thanks to xet7.
   Thanks to xet7.
 
 
 Thanks to above GitHub users for their contributions and translators for their translations.
 Thanks to above GitHub users for their contributions and translators for their translations.

文件差异内容过多而无法显示
+ 4839 - 1
package-lock.json


+ 13 - 11
package.json

@@ -15,19 +15,21 @@
   "devDependencies": {
   "devDependencies": {
     "babel-plugin-istanbul": "^6.1.1",
     "babel-plugin-istanbul": "^6.1.1",
     "chai": "^4.3.4",
     "chai": "^4.3.4",
-    "flatted": "^3.2.4",
-    "puppeteer": "^13.0.0",
-    "sinon": "^12.0.1"
+    "flatted": "^3.2.2",
+    "puppeteer": "^10.2.0",
+    "sinon": "^11.1.2"
   },
   },
   "dependencies": {
   "dependencies": {
     "@babel/core": "^7.15.0",
     "@babel/core": "^7.15.0",
     "@babel/runtime": "^7.15.3",
     "@babel/runtime": "^7.15.3",
-    "ajv": "^8.8.2",
+    "@wekanteam/markdown-it-mermaid": "^0.5.1",
+    "ajv": "^6.12.6",
+    "babel-runtime": "^6.26.0",
     "bcryptjs": "^2.4.3",
     "bcryptjs": "^2.4.3",
-    "bson": "^4.6.0",
+    "bson": "^4.4.1",
     "bunyan": "^1.8.15",
     "bunyan": "^1.8.15",
-    "core-js": "^3.20.0",
-    "dompurify": "^2.3.4",
+    "core-js": "^2.6.12",
+    "dompurify": "^2.3.0",
     "es6-promise": "^4.2.4",
     "es6-promise": "^4.2.4",
     "exceljs": "^4.2.1",
     "exceljs": "^4.2.1",
     "fibers": "^5.0.0",
     "fibers": "^5.0.0",
@@ -37,15 +39,15 @@
     "jquery-ui-touch-punch": "^0.2.3",
     "jquery-ui-touch-punch": "^0.2.3",
     "jszip": "^3.7.1",
     "jszip": "^3.7.1",
     "ldapjs": "^2.3.1",
     "ldapjs": "^2.3.1",
-    "markdown-it": "^12.3.0",
+    "markdown-it": "^12.2.0",
     "markdown-it-emoji": "^2.0.0",
     "markdown-it-emoji": "^2.0.0",
     "meteor-node-stubs": "^1.1.0",
     "meteor-node-stubs": "^1.1.0",
     "mongodb": "^3.6.11",
     "mongodb": "^3.6.11",
     "os": "^0.1.2",
     "os": "^0.1.2",
-    "page": "^1.11.6",
+    "page": "^1.11.5",
     "papaparse": "^5.3.1",
     "papaparse": "^5.3.1",
-    "qs": "^6.10.2",
-    "source-map-support": "^0.5.21"
+    "qs": "^6.10.1",
+    "source-map-support": "^0.5.19"
   },
   },
   "meteor": {
   "meteor": {
     "testModule": "tests/main.js"
     "testModule": "tests/main.js"

+ 2 - 3
packages/markdown/src/template-integration.js

@@ -7,8 +7,7 @@ var Markdown = require('markdown-it')({
   breaks: true,
   breaks: true,
 });
 });
 
 
-// How to fix Mermaid bug so it would work? https://github.com/wekan/wekan/issues/4251
-//import markdownItMermaid from "@wekanteam/markdown-it-mermaid";
+import markdownItMermaid from "@wekanteam/markdown-it-mermaid";
 
 
 // Static URL Scheme Listing
 // Static URL Scheme Listing
 var urlschemes = [
 var urlschemes = [
@@ -38,7 +37,7 @@ for(var i=0; i<urlschemes.length;i++){
 
 
 var emoji = require('markdown-it-emoji');
 var emoji = require('markdown-it-emoji');
 Markdown.use(emoji);
 Markdown.use(emoji);
-//Markdown.use(markdownItMermaid);
+Markdown.use(markdownItMermaid);
 
 
 if (Package.ui) {
 if (Package.ui) {
   const Template = Package.templating.Template;
   const Template = Package.templating.Template;

部分文件因为文件数量过多而无法显示