From b3b8010e6460bb9c9ba8ed412375647c3e9ab1a1 Mon Sep 17 00:00:00 2001 From: bailicangdu <1264889788@qq.com> Date: Wed, 12 Jan 2022 15:33:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9E=20Fix=20bug=20of=20parser?= =?UTF-8?q?=20style=20error=20when=20using=20IE6=20and=207=20csshack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en-us/changelog.md | 3 ++- docs/zh-cn/changelog.md | 1 + src/source/scoped_css.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/en-us/changelog.md b/docs/en-us/changelog.md index 38f5ce699..98f460928 100644 --- a/docs/en-us/changelog.md +++ b/docs/en-us/changelog.md @@ -14,7 +14,8 @@ - **Bug Fix** - - 🐞 Fix bug of element-plus dom escape from micro-app element, issue [#157](https://github.com/micro-zoe/micro-app/issues/157)、[#121](https://github.com/micro-zoe/micro-app/issues/121). + - 🐞 Fix bug of element-plus dom escape from micro-app element, issue [#157](https://github.com/micro-zoe/micro-app/issues/157), [#121](https://github.com/micro-zoe/micro-app/issues/121). + - 🐞 Fix bug of parser style error when using IE6 and 7 csshack, issue [#232](https://github.com/micro-zoe/micro-app/issues/223). - **Update** diff --git a/docs/zh-cn/changelog.md b/docs/zh-cn/changelog.md index cc5efdb35..e47077b0a 100644 --- a/docs/zh-cn/changelog.md +++ b/docs/zh-cn/changelog.md @@ -15,6 +15,7 @@ - **Bug Fix** - 🐞 修复了element-plus部分组件逃离元素隔离的问题, issue [#223](https://github.com/micro-zoe/micro-app/issues/223)。 + - 🐞 修复了在使用IE6、7 CSSHack时样式解析失败的问题, issue [#232](https://github.com/micro-zoe/micro-app/issues/223)。 - **Update** diff --git a/src/source/scoped_css.ts b/src/source/scoped_css.ts index 31f3e022f..64fc2765f 100644 --- a/src/source/scoped_css.ts +++ b/src/source/scoped_css.ts @@ -107,7 +107,7 @@ class CSSParser { // match one styleDeclaration at a time private styleDeclaration (): boolean | void { // css property - if (!this.commonMatch(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/)) return false + if (!this.commonMatch(/^(\*?[-#+\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/)) return false // match : if (!this.commonMatch(/^:\s*/)) return parseError("property missing ':'", this.linkPath)