clarity-pattern-parser 10.1.3 → 10.1.5
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/dist/index.browser.js +2 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/patterns/Context.ts +1 -1
- package/src/patterns/Reference.ts +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -842,7 +842,7 @@ class Reference {
|
|
|
842
842
|
continue;
|
|
843
843
|
}
|
|
844
844
|
const foundPattern = pattern.getPatternWithinContext(this.name);
|
|
845
|
-
if (foundPattern != null) {
|
|
845
|
+
if (foundPattern != null && foundPattern.type !== "reference") {
|
|
846
846
|
return foundPattern;
|
|
847
847
|
}
|
|
848
848
|
pattern = pattern.parent;
|
|
@@ -2562,7 +2562,7 @@ class Context {
|
|
|
2562
2562
|
return this._pattern.test(text, record);
|
|
2563
2563
|
}
|
|
2564
2564
|
clone(name = this._name) {
|
|
2565
|
-
const clone = new Context(name, this._pattern, this.
|
|
2565
|
+
const clone = new Context(name, this._pattern, Object.values(this._patterns));
|
|
2566
2566
|
return clone;
|
|
2567
2567
|
}
|
|
2568
2568
|
getTokens() {
|