@bbn/bbn 2.0.41 → 2.0.42

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.
@@ -91,8 +91,13 @@ function partsToPattern(parts, resolved, requestedOpts) {
91
91
  case 'literal': {
92
92
  // Wrap literals in [ ... ] so your parser won't confuse them with tokens
93
93
  if (p.value.length) {
94
- const v = p.value.replace(/]/g, '\\]');
95
- pattern += `[${v}]`;
94
+ if (![' ', ',', '/', '-', ':', '.'].includes(p.value)) {
95
+ const v = p.value.replace(/]/g, '\\]');
96
+ pattern += `[${v}]`;
97
+ }
98
+ else {
99
+ pattern += p.value;
100
+ }
96
101
  }
97
102
  break;
98
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.41",
3
+ "version": "2.0.42",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",