@stoplight/elements 7.8.0 → 7.9.1

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/index.esm.js CHANGED
@@ -434,7 +434,8 @@ function findMapMatch(key, map) {
434
434
  if (typeof key === 'number')
435
435
  return;
436
436
  for (const entry of map) {
437
- if (!!((_a = entry.match) === null || _a === void 0 ? void 0 : _a.match(key)) || (entry.notMatch !== void 0 && !entry.notMatch.match(key))) {
437
+ const escapedKey = key.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
438
+ if (!!((_a = entry.match) === null || _a === void 0 ? void 0 : _a.match(escapedKey)) || (entry.notMatch !== void 0 && !entry.notMatch.match(escapedKey))) {
438
439
  return entry;
439
440
  }
440
441
  }
package/index.js CHANGED
@@ -467,7 +467,8 @@ function findMapMatch(key, map) {
467
467
  if (typeof key === 'number')
468
468
  return;
469
469
  for (const entry of map) {
470
- if (!!((_a = entry.match) === null || _a === void 0 ? void 0 : _a.match(key)) || (entry.notMatch !== void 0 && !entry.notMatch.match(key))) {
470
+ const escapedKey = key.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
471
+ if (!!((_a = entry.match) === null || _a === void 0 ? void 0 : _a.match(escapedKey)) || (entry.notMatch !== void 0 && !entry.notMatch.match(escapedKey))) {
471
472
  return entry;
472
473
  }
473
474
  }
package/index.mjs CHANGED
@@ -434,7 +434,8 @@ function findMapMatch(key, map) {
434
434
  if (typeof key === 'number')
435
435
  return;
436
436
  for (const entry of map) {
437
- if (!!((_a = entry.match) === null || _a === void 0 ? void 0 : _a.match(key)) || (entry.notMatch !== void 0 && !entry.notMatch.match(key))) {
437
+ const escapedKey = key.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
438
+ if (!!((_a = entry.match) === null || _a === void 0 ? void 0 : _a.match(escapedKey)) || (entry.notMatch !== void 0 && !entry.notMatch.match(escapedKey))) {
438
439
  return entry;
439
440
  }
440
441
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoplight/elements",
3
- "version": "7.8.0",
3
+ "version": "7.9.1",
4
4
  "description": "UI components for composing beautiful developer documentation.",
5
5
  "keywords": [],
6
6
  "main": "./index.js",
@@ -26,7 +26,7 @@
26
26
  "react-dom": ">=16.8"
27
27
  },
28
28
  "dependencies": {
29
- "@stoplight/elements-core": "~7.8.0",
29
+ "@stoplight/elements-core": "~7.9.0",
30
30
  "@stoplight/http-spec": "^5.1.4",
31
31
  "@stoplight/json": "^3.18.1",
32
32
  "@stoplight/mosaic": "^1.33.0",