Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2022-03-17 00:18:38 +0300
committerGitHub <noreply@github.com>2022-03-17 00:18:38 +0300
commitbe9c5287512858aa57675328945a5e189f29d0dd (patch)
treefc619e09fb2d740e8612a16d8edaf653bd6bdb4e /.github
parentac20efd2a26202d272604cb353d0d365a3f69c2d (diff)
Fix beginning fixups of captures after Regex span support (#66713)
The Regex span support changed the scanning infrastructure to always be based on spans. That means that when a string is passed in by the caller, internally we still operate on it as a span. That also means we can take advantage of slicing, and if the caller has specified via a beginning/length set of arguments that we should only process a substring, we can just slice to that substring. That, however, then means that all offsets computed by the scanning implementation are 0-based rather than beginning-based. The span change included a fixup for the overall match position, but not for the position of each individual capture, and that then meant that captures were providing the wrong values. We unfortunately didn't have any tests for validating groups that also involved non-0 beginnings with string inputs.
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions