feat: only work with the last match in case where the regex contains global flag #27

Closed
nsrCodes wants to merge 1 commit from fix-matchBefore-global-flag-case into main
nsrCodes commented 2025-01-22 17:58:20 +01:00 (Migrated from github.com)

fixes: https://github.com/codemirror/dev/issues/1510

I have handled this explicitly for expressions with a global flag, but I feel the last match is the match that should be used in every case here.
The existing extra logic in ensureAnchor makes me believe there are some conditions that I might not be aware of, hence the explicit global case.

fixes: https://github.com/codemirror/dev/issues/1510 I have handled this explicitly for expressions with a global flag, but I feel the last match is _the_ match that should be used in every case here. The existing extra logic in `ensureAnchor` makes me believe there are some conditions that I might not be aware of, hence the explicit global case.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
codemirror/autocomplete!27
No description provided.