Skip to content

Commit

Permalink
Editorial: Improve the note contrasting RegExp.escape with EscapeRegE…
Browse files Browse the repository at this point in the history
…xpPattern
  • Loading branch information
gibson042 authored Mar 27, 2024
1 parent 29b08c3 commit aa740cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contributors: Jordan Harband
</emu-alg>

<emu-note>
<p>`escape` takes a string and escapes it so it can be literally represented as a pattern. In contrast EscapeRegExpPattern (as the name implies) takes a pattern and escapes it so that it can be represented as a string. While the two are related, they do not share the same character escape set or perform similar actions.</p>
<p>Despite having similar names, EscapeRegExpPattern and `RegExp.escape` do not perform similar actions. The former escapes a pattern for representation as a string, while this function escapes a string for representation inside a pattern.</p>
</emu-note>
</emu-clause>

Expand Down

0 comments on commit aa740cd

Please sign in to comment.