Skip to content

Commit

Permalink
Editorial: Change "Step 2.a" to "Step 2.b" in RepeatMatcher note
Browse files Browse the repository at this point in the history
PR tc39#1889 (among other things) inserted a step before the former 2.a,
but didn't update the note that referenced it.
  • Loading branch information
jmdyck committed Apr 23, 2020
1 parent 170a850 commit 7489ab8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -31541,7 +31541,7 @@ <h1>Runtime Semantics: RepeatMatcher ( _m_, _min_, _max_, _greedy_, _x_, _c_, _p
<p>because each iteration of the outermost `*` clears all captured Strings contained in the quantified |Atom|, which in this case includes capture Strings numbered 2, 3, 4, and 5.</p>
</emu-note>
<emu-note>
<p>Step 2.a of the RepeatMatcher states that once the minimum number of repetitions has been satisfied, any more expansions of |Atom| that match the empty character sequence are not considered for further repetitions. This prevents the regular expression engine from falling into an infinite loop on patterns such as:</p>
<p>Step 2.b of the RepeatMatcher states that once the minimum number of repetitions has been satisfied, any more expansions of |Atom| that match the empty character sequence are not considered for further repetitions. This prevents the regular expression engine from falling into an infinite loop on patterns such as:</p>
<pre><code class="javascript">/(a*)*/.exec("b")</code></pre>
<p>or the slightly more complicated:</p>
<pre><code class="javascript">/(a*)b\1+/.exec("baaaac")</code></pre>
Expand Down

0 comments on commit 7489ab8

Please sign in to comment.