From 49bc5965ae0aec48ad1264609fc13f07c77fefe2 Mon Sep 17 00:00:00 2001 From: moshangqi <2509678669@qq.com> Date: Wed, 13 Dec 2023 15:06:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E6=AD=A3=E5=88=99=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84=E5=BC=95=E5=85=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc.js | 3 ++- scripts/preset-editor.js | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.prettierrc.js b/.prettierrc.js index a97dd033..df37bb65 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -13,5 +13,6 @@ module.exports = { htmlWhitespaceSensitivity: 'ignore', endOfLine: 'lf', embeddedLanguageFormatting: 'auto', - bracketSpacing: true + bracketSpacing: true, + printWidth: 120 }; diff --git a/scripts/preset-editor.js b/scripts/preset-editor.js index 1a44dfd7..69c972a2 100644 --- a/scripts/preset-editor.js +++ b/scripts/preset-editor.js @@ -22,8 +22,13 @@ const lakeIconURL = 'https://mdn.alipayobjects.com/design_kitchencore/afts/file/ const remoteAssetsUrls = { lakejs: { src: `https://gw.alipayobjects.com/render/p/yuyan_npm/@alipay_lakex-doc/${LAKE_EDITOR_VERSION}/umd/doc.umd.js`, - after: (content) => { - return content.replace(lakeIconURL, './lake-editor-icon.js'); + after: content => { + let result = content; + result = result.replace(/https\:\/\/gw\.alipayobjects\.com[\w\/\.]+CodeMirror\.js/g, './CodeMirror.js'); + result = result.replace(/https\:\/\/gw\.alipayobjects\.com[\w\/\.]+katex\.min\.js/g, './katex.min.js'); + result = result.replace(lakeIconURL, './lake-editor-icon.js'); + console.log(content); + return result; }, name: 'doc.umd.js', }, From d426f41d5fdd6546a5fd6a90d761193192a86f57 Mon Sep 17 00:00:00 2001 From: moshangqi <2509678669@qq.com> Date: Wed, 13 Dec 2023 15:16:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E6=AD=A3=E5=88=99=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84=E5=BC=95=E5=85=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/preset-editor.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/preset-editor.js b/scripts/preset-editor.js index 69c972a2..667309da 100644 --- a/scripts/preset-editor.js +++ b/scripts/preset-editor.js @@ -27,7 +27,6 @@ const remoteAssetsUrls = { result = result.replace(/https\:\/\/gw\.alipayobjects\.com[\w\/\.]+CodeMirror\.js/g, './CodeMirror.js'); result = result.replace(/https\:\/\/gw\.alipayobjects\.com[\w\/\.]+katex\.min\.js/g, './katex.min.js'); result = result.replace(lakeIconURL, './lake-editor-icon.js'); - console.log(content); return result; }, name: 'doc.umd.js',