You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec.html
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34929,11 +34929,16 @@ <h1>
34929
34929
1. NOTE: _tailPos_ can exceed _stringLength_ only if this abstract operation was invoked by a call to the intrinsic @@replace method of %RegExp.prototype% on an object whose *"exec"* property is not the intrinsic %RegExp.prototype.exec%.
34930
34930
1. Else if _templateRemainder_ starts with *"$"* followed by 1 or more decimal digits, then
34931
34931
1. If _templateRemainder_ starts with *"$"* followed by 2 or more decimal digits, let _digitCount_ be 2. Otherwise, let _digitCount_ be 1.
34932
-
1. Let _ref_ be the substring of _templateRemainder_ from 0 to 1 + _digitCount_.
34933
34932
1. Let _digits_ be the substring of _templateRemainder_ from 1 to 1 + _digitCount_.
34934
34933
1. Let _index_ be ℝ(StringToNumber(_digits_)).
34935
34934
1. Assert: 0 ≤ _index_ ≤ 99.
34936
34935
1. Let _captureLen_ be the number of elements in _captures_.
34936
+
1. If _index_ > _captureLen_ and _digitCount_ = 2, then
34937
+
1. NOTE: When a two-digit replacement pattern specifies an index exceeding the count of capturing groups, it is treated as a one-digit replacement pattern followed by a literal digit.
34938
+
1. Set _digitCount_ to 1.
34939
+
1. Set _digits_ to the substring of _digits_ from 0 to 1.
34940
+
1. Set _index_ to ℝ(StringToNumber(_digits_)).
34941
+
1. Let _ref_ be the substring of _templateRemainder_ from 0 to 1 + _digitCount_.
0 commit comments