Is ≤ legal less equal to char?

I read the release notes for Visual Studio Code, and it especially caught my attention.

Screenshot from the release notes

As you can see, there is a javascript file with symbol ≤. I can’t understand how this works, if I try to use it in my code, I get the error “Invalid or unexpected token” (which I expected), and I can’t find if it only compresses the VSCode configuration <= to ≤ for aesthetic purposes.

How it works?

+4
source share
4 answers

This is only due to font ligature. Actual characters: 2: <=but the ligature displays them as one.

, Fira Code , , IDE, .

+1

Ligatures . , FiraCode, . -

Monoid


Hasklig

Haslig

LOT-, VS-.

0

, , VSC :

  • ( Monoid/Iosevka/Fira)
  • editor.fontFamily ,
  • editor.fontLigaturesset to true.
0
source

Source: https://habr.com/ru/post/1696144/


All Articles