From 7e38994c7fd83414131567b8fd809dcace8d11db Mon Sep 17 00:00:00 2001 From: yanglbme Date: Thu, 23 Jan 2025 09:04:39 +0800 Subject: [PATCH] fix: update --- package-lock.json | 23 +++++++++++++++++++---- package.json | 2 +- src/utils/index.ts | 4 ++-- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 94f5ae131..f22d03279 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,7 +61,7 @@ "less": "^4.2.2", "npm-run-all": "^4.1.5", "postcss": "^8.5.1", - "prettier": "3.4.2", + "prettier": "3.3.3", "rollup-plugin-visualizer": "^5.12.0", "shx": "^0.3.4", "simple-git-hooks": "^2.11.1", @@ -8840,6 +8840,21 @@ "eslint": "^8.40.0 || ^9.0.0" } }, + "node_modules/eslint-plugin-format/node_modules/prettier": { + "version": "3.4.2", + "resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/eslint-plugin-import-x": { "version": "4.6.1", "resolved": "https://registry.npmmirror.com/eslint-plugin-import-x/-/eslint-plugin-import-x-4.6.1.tgz", @@ -14828,9 +14843,9 @@ } }, "node_modules/prettier": { - "version": "3.4.2", - "resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.4.2.tgz", - "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "version": "3.3.3", + "resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" diff --git a/package.json b/package.json index 45f7df973..98c53caaa 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "less": "^4.2.2", "npm-run-all": "^4.1.5", "postcss": "^8.5.1", - "prettier": "3.4.2", + "prettier": "3.3.3", "rollup-plugin-visualizer": "^5.12.0", "shx": "^0.3.4", "simple-git-hooks": "^2.11.1", diff --git a/src/utils/index.ts b/src/utils/index.ts index f354bd0a1..bb8074394 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -187,8 +187,8 @@ export function exportHTML(primaryColor: string) { setStyles(element) const htmlStr = element.innerHTML - .replaceAll(`var(--md-primary-color)`, primaryColor) - .replaceAll(/--md-primary-color:.+?;/g, ``) + .replace(`var(--md-primary-color)`, primaryColor) + .replace(/--md-primary-color:.+?;/g, ``) const downLink = document.createElement(`a`)