@micro-zoe/micro-app 1.0.0-rc.16 → 1.0.0-rc.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- const version = '1.0.0-rc.16';
1
+ const version = '1.0.0-rc.17';
2
2
  // do not use isUndefined
3
3
  const isBrowser = typeof window !== 'undefined';
4
4
  // do not use isUndefined
@@ -912,14 +912,14 @@ class CSSParser {
912
912
  * should be ==> micro-app[name=xxx] :where(.a, .b, .c) a {}
913
913
  */
914
914
  const attributeValues = {};
915
- const matchRes = m[0].replace(/\[([^=]+)=?(.+?)\]/g, (match, p1, p2) => {
915
+ const matchRes = m[0].replace(/\[([^\]=]+)(?:=([^\]]+))?\]/g, (match, p1, p2) => {
916
916
  const mock = `__mock_${p1}Value__`;
917
917
  attributeValues[mock] = p2;
918
918
  return match.replace(p2, mock);
919
919
  });
920
920
  return matchRes.replace(/(^|,[\n\s]*)([^,]+)/g, (_, separator, selector) => {
921
921
  selector = trim(selector);
922
- selector = selector.replace(/\[[^=]+=?(.+?)\]/g, (match, p1) => {
922
+ selector = selector.replace(/\[([^\]=]+)(?:=([^\]]+))?\]/g, (match, p1) => {
923
923
  if (attributeValues[p1]) {
924
924
  return match.replace(p1, attributeValues[p1]);
925
925
  }