Skip to content

Commit c8cadb7

Browse files
Fix typo: s/to being with/to begin with/
1 parent a73746b commit c8cadb7

File tree

1 file changed

+1
-1
lines changed
  • javalib/src/main/scala/java/util/regex

1 file changed

+1
-1
lines changed

javalib/src/main/scala/java/util/regex/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ In general, we make sure that:
274274
* something that can match a supplementary code point or a high surrogate never selects the high surrogate if it could match the whole code point.
275275

276276
We do nothing special for low surrogates, as all possible patterns go from left to right (we don't have look-behinds in this context) and we otherwise make sure that all code points from the input are either fully matched or not at all.
277-
Therefore, the "cursor" of the engine can never stop in the middle of a code point, and so low surrogates are only visible if they were unpaired to being with.
277+
Therefore, the "cursor" of the engine can never stop in the middle of a code point, and so low surrogates are only visible if they were unpaired to begin with.
278278
The only exception to this is when the cursor is at the beginning of the pattern, when using `find`.
279279
In that case we cannot a priori prevent the JS engine from trying to find a match starting in the middle of a code point.
280280
To address that, we have special a posteriori handling in `Pattern.execFind()`.

0 commit comments

Comments
 (0)