syntax highlighting is a bit too aggressive
patrickhulce opened this issue Β· comments
Hey there great plugin, love it thanks for your work! π π π
I'm running into an issue though where an HTML-like thing is saved in a snapshot and then the rest of the syntax highlighting gets messed up for the entire file. I'm not sure how it all works, but perhaps it'd be better to identify the string ranges first and then apply syntax highlighting if possible?
exports[`file should handle HTML-like stuff 1`] = `"<input id=\\"label-text-input\\" type=\\"text\\">"`;
exports[`file should handle HTML-like stuff 2`] = `now everything is ugly for the rest of the file :(`;
Hello @patrickhulce
The TS plugin does not do anything with syntax highlighting. Instead you should open the issue in vscode-jest repository or the one which provides the snapshot files colorization (i know only about vscode-jest)
Hm interesting, I don't have vscode-jest installed and enabling/disabling your extension turns syntax highlighting on/off for .snap files. Maybe it's VSCode trying to do syntax highlighting on its own once there's a language service?
Ah, then looks like you're using snapshot-tools π . It has a same copy of vscode-jest syntax highlighting for snapshot files, so i'd recommend you to anyway fill the issue in vscode-jest. When it will be fixed, i just port it to snapshot-tools extension.
Oh whoops, my bad! Clicked links too fast without reading sorry :) will do