Erroneous output with upcoming Records syntax
See original GitHub issueDescription
Records are a new primitives in Javascript, and they are currently being implemented in Firefox (See https://bugzilla.mozilla.org/show_bug.cgi?id=1658309, https://bugzilla.mozilla.org/show_bug.cgi?id=1774360 and https://github.com/tc39/proposal-record-tuple)
Records are instantiated like objects, but with a hash before the curly bracket, e.g. #{ hello: "world" }
Input
The code looked like this before beautification:
#{ hello: "world" }
Expected Output
The code should have looked like this after beautification:
#{
hello: "world"
}
Actual Output
The code actually looked like this after beautification:
# {
hello: "world"
}
Notice the space between #
and {
.
If the output would be evaluated, it would result in a SyntaxError
Steps to Reproduce
Environment
OS: OSX
Settings
Default settings, I ran echo "#{hello: 'world'}" | npx js-beautify
Let me know if I can be of any help
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
IEB717I - IBM
INPUT RECORD SIZE EXCEEDS SPECIFIED OUTPUT RECORD SIZE. ... Syntax checking of the remainder of the utility control statements in this set continues, ......
Read more >Chapter 2: Syntax Checking Error Messages - Micro Focus
Chapter 2: Syntax Checking Error Messages. These messages are output when the compiler is checking your COBOL program for syntax and consistency.
Read more >FAQ: What is the Syntax Error Output group in IDoc Prepare ...
The Syntax Error Output Group provides the option to write the erroneous IDoc data in a separate group in case of a syntax...
Read more >php - SQL syntax error while getting the last records of the each user ...
SQL syntax error while getting the last records of the each user from the multiple tables, Also not getting the output · "...
Read more >7 Common GROUP BY Errors - LearnSQL.com
most SQL engines will give you an error. Some engines, however, will output weird, unwanted results. I'm using MySQL and when I run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m creating a new pull request continuing from the previous PR by @cwthedev because I have no permission to push into his actual branch. You can close his previous PR @bitwiseman, I’m sure to finish my PR in several days. ^^
Yes, I’m working on it