You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run cd `mktemp -d` (creates a new temporary dir and changes directories to it)
Run code --disable-extensions --user-data-dir . . 2. Add the following settings to settings.json (must have Fira Code font installed):
```json
{
"editor.fontFamily": "'Fira Code', Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 13
}
```(turns out this happens on a fresh vscode install without ligatures activated)
Create a new file called README.md with the following content:
// NTARH also supports typed response data via TypeScript generics:awaittestApiHandler<{hello: string}>({// The next line would cause TypeScript to complain:// handler: (_, res) => res.status(200).send({ hello: false }),handler: (_,res)=>res.status(200).send({hello: 'world'}),requestPatcher: (req)=>(req.headers={key: process.env.SPECIAL_TOKEN}),test: async({ fetch })=>{constres=awaitfetch({method: 'POST',body: 'data'});// The next line would cause TypeScript to complain:// const { goodbye: hello } = await res.json();const{ hello }=awaitres.json();expect(hello).toBe('world');// ◄ Passes!}});
Notice that all of the > characters in the=>ligatures are strangely colored, where the = is blue (the correct color) but the > is red (incorrect color).
This just started happening a few updates ago. I hoped it would go away on its own, but here we are. I'm not sure exactly what changed that caused this. It has nothing to do with any of my extensions (all disabled) or my vscode settings (using blank user data directory).
This syntax highlighting issue does not happen with actual TypeScript code in .ts files, and it goes away if I change the code fence flag from typescript to javascript.
Using typescript code fence flag in README.md (renders incorrectly):
Using javascript code fence flag in README.md (renders correctly):
Using a TypeScript file ending in .ts (renders correctly):
VS Code version: Code 1.72.1 (129500e, 2022-10-10T17:23:00.760Z)
OS version: Linux x64 5.15.0-48-generic
Modes: Restricted
Sandboxed: No
System Info
Item
Value
CPUs
AMD Ryzen Threadripper 3970X 32-Core Processor (64 x 4149)
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.72.2. Please try upgrading to the latest version and checking whether this issue remains.
Type: Bug
cd `mktemp -d`
(creates a new temporary dir and changes directories to it)code --disable-extensions --user-data-dir . .
2. Add the following settings to(turns out this happens on a fresh vscode install without ligatures activated)settings.json
(must have Fira Code font installed):```json
{
"editor.fontFamily": "'Fira Code', Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 13
}
```
README.md
with the following content:>
characters inthe=>
ligaturesare strangely colored, where the=
is blue (the correct color) but the>
is red (incorrect color).This just started happening a few updates ago. I hoped it would go away on its own, but here we are. I'm not sure exactly what changed that caused this. It has nothing to do with any of my extensions (all disabled) or my vscode settings (using blank user data directory).
This syntax highlighting issue does not happen with actual TypeScript code in
.ts
files, and it goes away if I change the code fence flag fromtypescript
tojavascript
.Using
typescript
code fence flag inREADME.md
(renders incorrectly):Using
javascript
code fence flag inREADME.md
(renders correctly):Using a TypeScript file ending in
.ts
(renders correctly):VS Code version: Code 1.72.1 (129500e, 2022-10-10T17:23:00.760Z)
OS version: Linux x64 5.15.0-48-generic
Modes: Restricted
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: