Skip to content

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

Open
nsrCodes wants to merge 1 commit intocodemirror:mainfrom
nsrCodes:fix-matchBefore-global-flag-case
Open

feat: only work with the last match in case where the regex contains global flag#27
nsrCodes wants to merge 1 commit intocodemirror:mainfrom
nsrCodes:fix-matchBefore-global-flag-case

Conversation

@nsrCodes
Copy link

fixes: codemirror/dev#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

context.matchBefore for creating autocompletions ignores other matches if there is a match at the start of the line

1 participant

Comments