html.tmbundle
html.tmbundle copied to clipboard
Embedded javascript string with `//` have unexpected behavrio
Original from @Namorzyny in https://github.com/microsoft/vscode/issues/105779
Steps to Reproduce:
- Input some code like:
<input type="button" value="text" onclick="location.href='https://www.google.com'">
- The code will display as a comment:
This only occurs if the //
is in the string. The character before the //
will get invalid.illegal.newline.js
.
This issue doesn't occur with just the javascript grammar, only when its embedded like this.
Thanks to some investigation from @mjbvz, the issue appears to be here: https://github.com/textmate/html.tmbundle/blob/0c3d5ee54de3a993f747f54186b73a4d2d3c44a2/Syntaxes/HTML.plist#L341-L359
Original comment is https://github.com/microsoft/vscode/issues/112189#issuecomment-742157879
Well, same will happen when you use /*
as well