question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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:open
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
roblourenscommented, Mar 16, 2019

Ah I see it in that case. I think it will parse the opening < as a JS operator. But probably works in a browser.

0reactions
msftrncscommented, May 2, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found