Skip to content
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

Test Unusual Line Terminators #98989

Closed
2 tasks done
alexdima opened this issue Jun 1, 2020 · 0 comments
Closed
2 tasks done

Test Unusual Line Terminators #98989

alexdima opened this issue Jun 1, 2020 · 0 comments

Comments

@alexdima
Copy link
Member

alexdima commented Jun 1, 2020

Test plan item for #96142

Complexity: 3

Create Issue


There are some characters, like LS, PS or NEL, which are considered to be line terminators in certain languages, according to their spec:

char/seq Unicode JS C# HTML Python PHP Java YAML
CRLF
CR
LF
LS
PS
NEL
FF
VT

But VS Code only considers CRLF, CR or LF to be line terminators. This can become very problematic when VS Code attempts to communicate with a language server that uses a different set as line terminators (e.g. tsserver).

It would be very difficult to make VS Code have language based line terminators, so the current thinking is to try to get rid of these problematic characters, since, most likely, they were unintentional.

(There is a body of text below which contains such a character below).

Please check that:

  • when pasting such text a prompt is shown
  • when opening a file a prompt is shown
  • in the prompt, it is explained (in short) what the problem is
  • in the prompt, it is possible to ignore the problem
  • in the prompt, it is possible to fix things
  • there is a setting, editor.unusualLineTerminators, which can be configured to off to never do anything about these characters, to auto to remove them silently and to prompt (the default) which shows a confirmation prompt before doing anything.
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;

}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants