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..667309da 100644 --- a/scripts/preset-editor.js +++ b/scripts/preset-editor.js @@ -22,8 +22,12 @@ 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'); + return result; }, name: 'doc.umd.js', },