Skip to content

Commit

Permalink
[spec] more PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 29, 2024
1 parent bc1baf9 commit b714371
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -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_).
Expand Down

0 comments on commit b714371

Please sign in to comment.