-
Notifications
You must be signed in to change notification settings - Fork 29k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javascript Highlighting broken // showing errors where there are none #95685
Comments
Please share the text of the code along with screenshots |
var Input;
var lastInput;
var position =0;
var ftext = [
"Und", "dann", "eines"];
var opacityTitle=1;
document.addEventListener("keydown", function(event) {
if (event.which >= 32 && event.which <= 122 && event.which != lastInput) {
lastInput = event.which;
advance();
}
else if (event.which == 8) {
lastInput = event.which;
strikeOut();
}
});
document.addEventListener("keydown", function(event) {
document.getElementById("fade").style.opacity = opacityTitle;
opacityTitle -= 0.06;
});
function advance(){
document.getElementById("butt").innerHTML += "<p id=\"" + position + "\" class=\"word\">" + ftext[position] + "</p>";
var nextWord = document.createElement("P");
var textnode = document.createTextNode(ftext[position]);
nextWord.appendChild(textnode);
nextWord.classList.add("word");
document.getElementById("butt").appendChild(nextWord);
position++;
var foo=3;
var bar=4;
}
function strikeOut(){
document.getElementById("butt").innerHTML = lastInput;
} I have not changed anything between the first and the second screenshot besides closing and reopening the file. |
Thanks. The line This causes both the highlighting and error detection to have issues. @alexdima Adding you to see if we want to render this character (it also does not show up with |
Opened microsoft/TypeScript#38078 for the TS issue |
@mjbvz The PS (U+2029) character is rendered on Windows in Edge and in VSCode. Is this perhaps a mac specific rendering issue? |
Thank you for the investigation @alexdima! Yes the the rendering bug is Mac specific. The paragraph separator is rendered for me on windows but not on MacOS |
This is now a lot better because the following shows up when opening a file or pasting this code (due to #96142): |
To verify, open a file with the PS character and click "Ignore problem for this file": You can grap a PS character from here:
|
Steps to Reproduce:
Highlighting just started to be broken out of the blue in Javascript. I am just learning, so I was fooling with HTML/CSS/JS when VS Code was showing faux errors and weird behaviors in highlighting. The error messages would not show when i closed and reopened the file or when i was opening the same file in sublime text.
I am happy to provide any additional Information, but as I am fairly new it would be great if you could tell me what you need or where to find it...
Thank you in advance!
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: