You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's too simple. We still need to remove the HTML comments from the script. But the fix could be to clear them out instead replacing with /* and */
aeschli
changed the title
JavaScript block comment with arrow in HTML script - Expression expected / Unterminated regular expression literal.
[html] validation error on JavaScript block comment with arrow in HTML script
Dec 12, 2024
Does this issue occur when all extensions are disabled?
Yes, all extensions have been disabled for the workspace
VS Code / OS
Steps to Reproduce
Create a HTML file with the following content:
🙁 Actual behavior
Console shows 2 problems:
Full errors:
[{
"resource": "test.html",
"owner": "generated_diagnostic_collection_name#1",
"severity": 8,
"message": "Expression expected.",
"source": "javascript",
"startLineNumber": 2,
"startColumn": 8,
"endLineNumber": 2,
"endColumn": 9
}]
[{
"resource": "test.html",
"owner": "generated_diagnostic_collection_name#1",
"severity": 8,
"message": "Unterminated regular expression literal.",
"source": "javascript",
"startLineNumber": 2,
"startColumn": 10,
"endLineNumber": 2,
"endColumn": 10
}]
It even shows more errors for every pair of
--
within the comment block.e.g.
Results in a total of 16 errors logged (15 x expression expected, 1 x Unterminated regular expression literal.)
🙂 Expected behavior
Ignore whatever is in comments.
The text was updated successfully, but these errors were encountered: