cannot format javascript when razor in script tag #10379
Labels
author: migration bot 🤖
The issue was created by a issue mover bot. The author may not be the actual author
Milestone
This issue has been moved from a ticket on Developer Community.
for example:<script type="text/javascript"> function foo() { return false; //note there have too many whitespace } @if (true) { } //if remoe this code, ctrl+K,D work fine</script>
Original Comments
Armando Aguirre Sepulveda [MSFT] on 29/09/2017, 04:32 AM:
(private comment, text removed)
Mohamad Yahia on 26/09/2019, 03:22 PM:
(private comment, text removed)
ahdung-ai on 26/09/2019, 04:43 PM:
(private comment, text removed)
pauldbentley on 13/08/2022, 01:49 AM:
(private comment, text removed)
Original Solutions
Mohamad Yahia solved on 26/09/2019, 04:55 PM, 1 votes:
I found a simple work around for when I first open a file and it’s not formatted
Replace all @ with @@
Format Document
Replace all @@ with @
That works but it’s a pain and normal formatting should just work.
ahdung-ai on 26/09/2019, 05:01 PM:
(private comment, text removed)
Mohamad Yahia solved on 26/09/2019, 03:23 PM, 0 votes:
*DELETED COMMENT*
The text was updated successfully, but these errors were encountered: