You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the below seen kind of Unicode Literal as Key, js-beautify breaks the code.
The resulting code creates a SyntaxError: Invalid or unexpected token
I also only today learned that the input is valid syntax. It's apparently equivalent to {"𝒶": "ascr"} (note that "𝒶" != "a")
Input
The code looked like this before beautification:
{\u{1d4b6}:"ascr"}
Expected Output
The code should have looked like this after beautification:
{
\u{1d4b6}: "ascr"
}
or
{
"\u{1d4b6}": "ascr"
}
or
{
"𝒶": "ascr"
}
Actual Output
The code actually looked like this after beautification:
{
\
u {
1 d4b6
}: "ascr"
}
(This is invalid js which fails to execute)
Steps to Reproduce
Simply paste input into js-beautify with default settings (web/npm)
Description
For the below seen kind of Unicode Literal as Key, js-beautify breaks the code.
The resulting code creates a
SyntaxError: Invalid or unexpected token
I also only today learned that the input is valid syntax. It's apparently equivalent to
{"𝒶": "ascr"}
(note that "𝒶" != "a")Input
The code looked like this before beautification:
Expected Output
The code should have looked like this after beautification:
or
or
Actual Output
The code actually looked like this after beautification:
(This is invalid js which fails to execute)
Steps to Reproduce
Simply paste input into js-beautify with default settings (web/npm)
Environment
Tested both in browser via https://beautifier.io/
and using the npm package
[email protected]
on Windows 10.Settings
Example:
The text was updated successfully, but these errors were encountered: