diff --git a/spec.emu b/spec.emu index 10a0f72..c909ae3 100644 --- a/spec.emu +++ b/spec.emu @@ -64,9 +64,10 @@ contributors: 1. Return the string-concatenation of 0x005C (REVERSE SOLIDUS) and the string in the “ControlEscape” column of the row whose “Code Point” column contains _c_. 1. Let _otherPunctuators_ be the string-concatenation of *",-=<>#&!%:;@~'`"* and the code unit 0x0022 (QUOTATION MARK). 1. Let _toEscape_ be StringToCodePoints(_otherPunctuators_). - 1. If _toEscape_ contains _c_, _c_ is matched by |WhiteSpace| or |LineTerminator|, or _c_ has the same numeric value as a leading surrogate or trailing surrogate, then - 1. If the numeric value of _c_ ≤ 0xFF, then - 1. Let _hex_ be Number::toString(𝔽(_c_), 16). + 1. If _toEscape_ contains _c_, _c_ is matched by either |WhiteSpace| or |LineTerminator|, or _c_ has the same numeric value as a leading surrogate or trailing surrogate, then + 1. Let _cNum_ be the numeric value of _c_. + 1. If _cNum_ ≤ 0xFF, then + 1. Let _hex_ be Number::toString(𝔽(_cNum_), 16). 1. Return the string-concatenation of the code unit 0x005C (REVERSE SOLIDUS), *"x"*, and StringPad(_hex_, 2, *"0"*, ~start~). 1. Let _escaped_ be the empty String. 1. Let _codeUnits_ be UTF16EncodeCodePoint(_c_).