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
@@ -8667,7 +8667,6 @@
8667
8667
  */
8668
8668
  *matchAll(input) {
8669
8669
  const m = this.matcher(input);
8670
- const inputStr = typeof input === 'string' ? input : m.matcherInput.asCharSequence();
8671
8670
  while (m.find()) {
8672
8671
  // Build the match array starting with the full match
8673
8672
  const result = [m.group(0)];
@@ -8680,7 +8679,7 @@
8680
8679
 
8681
8680
  // Attach native RegExp match properties
8682
8681
  result.index = m.start(0);
8683
- result.input = inputStr;
8682
+ result.input = input; // Retains original String or Uint8Array so index aligns perfectly
8684
8683
 
8685
8684
  // Attach named capture groups if they exist
8686
8685
  const namedGroups = this.namedGroups();