[html] embedded java script grammar doesn't end because of missing semicolon
See original GitHub issue- VSCode Version: latest
- OS Version: windows 10
Steps to Reproduce:
1.forget a semi-colon in a script tag in head (not required in JS for every line) 2.press ctrl + /
Does this issue occur when all extensions are disabled?: Yes
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
SyntaxError: missing ; before statement - JavaScript | MDN
The JavaScript exception "missing ; before statement" occurs when there is a semicolon (;) missing somewhere and can't be added by automatic semicolon...
Read more >How do I fix this missing semicolon syntax error in ...
Retype the code manually and it will work correctly. Copy/Pasting your code exactly produces errors, but manually entering it doesn't. – Michael Berkowski....
Read more >A Bit of Advice for the JavaScript Semicolon Haters
// Because a semicolon isn't inserted, that code behaves like this... var a = obj[a].forEach(logProp) // and since `a` is still `undefined` at ......
Read more >Understanding Automatic Semicolon Insertion in JavaScript
The principle of the feature is to provide a little leniency when evaluating the syntax of a JavaScript program by conceptually inserting ......
Read more >Why is the error of missing a semicolon seemingly so ...
Whenever you use a period to end a sentence, you have the right place to use a semicolon. If the two sentences are...
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
Ah I see it in that case. I think it will parse the opening
<
as a JS operator. But probably works in a browser.I don’t think this issue will be fixed by https://github.com/Microsoft/vscode-textmate/pull/85, as I look at this, this specific issue is a limitation of TextMate, which lacks a construct that acts something between the Begin/End rules and the Begin/While rules. Begin/While rules solve a very specific problem, but cannot be used here. We really could use a Begin\Until system. Unlike a Begin\While rule, a Begin\Until rule would capture all the content of the line up to the point the Until pattern matched and process it with the current rule stack, before restoring the stack to the condition it was in before the Begin/Until rule began.