From 44ab978a0d0455cad02b7e8088b092cf6800453b Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 19 Mar 2024 23:28:21 -0700 Subject: [PATCH] [spec] remove dfn See https://github.com/tc39/proposal-regex-escaping/issues/58#issuecomment-1912676831 --- spec.emu | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spec.emu b/spec.emu index d5212fb..fc1e600 100644 --- a/spec.emu +++ b/spec.emu @@ -43,16 +43,12 @@ contributors: Jordan Harband

RegExp.escape ( _S_ )

This method takes a string and returns a similar string in which each character that is potentially special in a regular expression |Pattern| has been replaced by an escape sequence representing that character.

It performs the following steps when called:

-

- The phrase "the ASCII punctuators that need escaping" - denotes the following String, which consists of every ASCII punctuator except U+005F (LOW LINE): - *"(){}[]|,.?\*+-^$=<>\/#&!%:;@~'"`"*. -

1. Let _str_ be ? ToString(_S_). 1. Let _cpList_ be StringToCodePoints(_str_). - 1. Let _toEscape_ be StringToCodePoints(the ASCII punctuators that need escaping). + 1. Let _punctuators_ be the following String, which consists of every ASCII punctuator except U+005F (LOW LINE): *"(){}[]|,.?\*+-^$=<>\/#&!%:;@~'"`"*. + 1. Let _toEscape_ be StringToCodePoints(_punctuators_). 1. Let _escapedList_ be a new empty List. 1. For each code point _c_ in _cpList_, do 1. If _escapedList_ is empty and _c_ is matched by |DecimalDigit|, then