Unable to beautify the js code in html files
See original GitHub issueVersions: beautify - 0.4.1 vsCode - 1.5.2
Settings:
"beautify.onSave": true,
"beautify.JSfiles": [
"html",
"js",
"json",
"jsbeautifyrc",
"jshintrc"
]
Before Formatting:
After Formatting:
As you can see, the alignment/formatting of js code inside the html file is not working. Where as if its in a .js file, its working like charm.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Prettier not formatting HTML files in VS Code - Stack Overflow
I simply solved it by right-clicking in the file, select 'Format Document with' and choose 'prettier ...
Read more >CodeMix & Angular IDE - Genuitec
To enable Beautify for a particular file extension, you can either do it from the editor or add this flag to the settings...
Read more >js-beautify - npm
Start using js-beautify in your project by running `npm i js-beautify`. ... HTML or CSS files, but you can install css-beautify for CSS:....
Read more >Handling common JavaScript problems - MDN Web Docs
We are going to write code to fetch the flowers image and display it in the page. Next, save a copy of the...
Read more >Vue JavaScript Tutorial in Visual Studio Code
VS Code will launch and display your Vue application in the File Explorer. Vetur extension. Now expand the src folder and select the...
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 Free
Top 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
If you don’t use a
.jsbeautifyrc
file, we use your vscode settings. Unfortunately, the default for"html.format.unformatted"
includesscript
. Add this setting to you user settings and remove thescript,
from the list.The default:
"html.format.unformatted": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var"
You’re welcome.