clarity-pattern-parser 10.0.1 → 10.0.2
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 +3 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/patterns/FiniteRepeat.ts +1 -1
- package/src/patterns/InfiniteRepeat.ts +1 -1
package/package.json
CHANGED
|
@@ -117,7 +117,7 @@ export class FiniteRepeat implements Pattern {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
if (this._trimDivider && this._hasDivider) {
|
|
120
|
-
const isDividerLastMatch = cursor.leafMatch.pattern === this.children[1];
|
|
120
|
+
const isDividerLastMatch = cursor.leafMatch.pattern?.id === this.children[1].id;
|
|
121
121
|
if (isDividerLastMatch) {
|
|
122
122
|
const node = nodes.pop() as Node;
|
|
123
123
|
cursor.moveTo(node.firstIndex);
|
|
@@ -196,7 +196,7 @@ export class InfiniteRepeat implements Pattern {
|
|
|
196
196
|
if (dividerNode == null) {
|
|
197
197
|
cursor.moveTo(dividerStartIndex);
|
|
198
198
|
|
|
199
|
-
if (
|
|
199
|
+
if (repeatNode == null) {
|
|
200
200
|
// If neither the repeat pattern or divider pattern matched get out.
|
|
201
201
|
passed = true;
|
|
202
202
|
break;
|