re2js 2.6.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  * re2js
3
3
  * RE2JS is the JavaScript port of RE2, a regular expression engine that provides linear time matching
4
4
  *
5
- * @version v2.6.0
5
+ * @version v2.6.1
6
6
  * @author Oleksii Vasyliev
7
7
  * @homepage https://github.com/le0pard/re2js#readme
8
8
  * @repository github:le0pard/re2js
@@ -8663,7 +8663,6 @@ class RE2JS {
8663
8663
  */
8664
8664
  *matchAll(input) {
8665
8665
  const m = this.matcher(input);
8666
- const inputStr = typeof input === 'string' ? input : m.matcherInput.asCharSequence();
8667
8666
  while (m.find()) {
8668
8667
  // Build the match array starting with the full match
8669
8668
  const result = [m.group(0)];
@@ -8676,7 +8675,7 @@ class RE2JS {
8676
8675
 
8677
8676
  // Attach native RegExp match properties
8678
8677
  result.index = m.start(0);
8679
- result.input = inputStr;
8678
+ result.input = input; // Retains original String or Uint8Array so index aligns perfectly
8680
8679
 
8681
8680
  // Attach named capture groups if they exist
8682
8681
  const namedGroups = this.namedGroups();