New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtomEscape's U parameter is reversed? #1094

Closed
mysticatea opened this Issue Feb 8, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@mysticatea
Contributor

mysticatea commented Feb 8, 2018

https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape

AtomEscape[U, N]::
    [+U] DecimalEscape
    [~U] DecimalEscape but only if the CapturingGroupNumber of DecimalEscape is <= NcapturingParens
    CharacterClassEscape
    CharacterEscape[~U, ?N]
    [+N]kGroupName

This production looks to allow arbitrary DecimalEscape if u flag is given but allow "only if the CapturingGroupNumber of DecimalEscape is <= NcapturingParens" if u flag is not given.

However, browser's behavior looks reverse. Was it intended the following?

AtomEscape[U, N]::
    [+U] DecimalEscape but only if the CapturingGroupNumber of DecimalEscape is <= NcapturingParens
    [~U] DecimalEscape
    CharacterClassEscape
    CharacterEscape[~U, ?N]
    [+N]kGroupName
@mysticatea

This comment has been minimized.

Show comment
Hide comment
@mysticatea

mysticatea Feb 8, 2018

Contributor

Never mind. I had misunderstood.

Contributor

mysticatea commented Feb 8, 2018

Never mind. I had misunderstood.

@mysticatea mysticatea closed this Feb 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment