From 874dba831199b734e58b49e6fdc46c29adf514de Mon Sep 17 00:00:00 2001 From: lamyin_ngai Date: Mon, 21 Aug 2023 13:02:50 +0800 Subject: [PATCH] chore(*): fix type check errors --- package.json | 2 +- src/utils/regexp.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 22cbaced..7e737f1f 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "standard-version": "^9.3.2", "ts-jest": "^27.1.1", "ts-node": "^10.7.0", - "typescript": "4.3.5", + "typescript": "4.5.5", "virtual-dom": "^2.1.1" }, "dependencies": { diff --git a/src/utils/regexp.js b/src/utils/regexp.js index a7c53924..540dc2fb 100644 --- a/src/utils/regexp.js +++ b/src/utils/regexp.js @@ -165,6 +165,7 @@ export function getCodeBlockRule() { begin: /(?:^|\n)(\n*((?:>[\t ]*)*)(?:[^\S\n]*))(`{3,})([^`]*?)\n/, content: /([\w\W]*?)/, // '([\\w\\W]*?)', end: /[^\S\n]*\3[ \t]*(?=$|\n+)/, // '\\s*```[ \\t]*(?=$|\\n+)', + reg: new RegExp(''), }; codeBlock.reg = new RegExp(codeBlock.begin.source + codeBlock.content.source + codeBlock.end.source, 'g'); return {