Closed RandomFractals closed 2 years ago
I resolved it by using display.text(string)
method, but I expected string vars to be outputted without concat or any escape characters as above. This works for now:
console.log(
or the like would resolve this.
Basically if you just dump a raw string, its the same as dumping output into a shell and the output is formatted by the shell to escape ansi codes.
And VS Codes renderer supports ANSI codes hence you get a green output, but when you open it as a plain text output due to the large content, then VS Code doesn't escape any of that output.
If you would like a change in that behavior please file an issue in VSCode as thats beyond the control of this extension.
When using
fs.readFileSync
withutf-8
encoding, Node.js kernel outputs odd text data, especially around new lines with some escape characters:Which results in the following data table display:
Expected:
Raw plain text CSV content of this data file: https://raw.githubusercontent.com/RandomFractals/vscode-data-table/main/data/usa-airports.csv
The same happens for JSON string: https://github.com/RandomFractals/vscode-data-table/blob/main/data/usa-airports.json