You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which is incorrect, one of the captures is missing its scope. This is likely because of reusing patterns (cardinalityValue in this case). The likely wrong component is, TagPattern, which blindly overwrites tag values under the same key. Instead, it should likely merge the tags. The extendMap call should be replaced with something more appropriate, that merges tag lists.
The other (maybe even more) likely candidate is the fact that tag creates a capture at construction, not at regex-generation. This is super problematic, as the capture will be reused. The if (!(this.element instanceof CapturePattern)) throw new Error('Tagging requires an underlying capture'); should be removed and wrapping should happen there instead.
Most likely: captures should map to a list of indices instead of one index, since a capture can appear multiple places.
The text was updated successfully, but these errors were encountered:
The following:
Generates this JSON:
Which is incorrect, one of the captures is missing its scope. This is likely because of reusing patterns (
cardinalityValue
in this case). The likely wrong component is,TagPattern
, which blindly overwrites tag values under the same key. Instead, it should likely merge the tags. TheextendMap
call should be replaced with something more appropriate, that merges tag lists.The other (maybe even more) likely candidate is the fact that
tag
creates a capture at construction, not at regex-generation. This is super problematic, as the capture will be reused. Theif (!(this.element instanceof CapturePattern)) throw new Error('Tagging requires an underlying capture');
should be removed and wrapping should happen there instead.Most likely: captures should map to a list of indices instead of one index, since a capture can appear multiple places.
The text was updated successfully, but these errors were encountered: