vsc-conceal icon indicating copy to clipboard operation
vsc-conceal copied to clipboard

"ugly": "\\in", not replaced correctly by "pretty": "∃" ?

Open grafcetonline opened this issue 2 years ago • 1 comments

For .tla file I want to substite "\in" by "∈"

TypeOK == color \in {"red", "green", "yellow"}

So in settings I specify

{ "pre": "", "ugly": "\\in", "post": "", "pretty": "∈" },

As result I get

TypeOK == color \∈ {"red", "green", "yellow"}

instead of

TypeOK == color ∈ {"red", "green", "yellow"}

grafcetonline avatar Jun 03 '22 06:06 grafcetonline

Backslashes are parsed twice, once by json to parse user settings, and again by regex to pattern match. { "pre": "", "ugly": "\\\\in", "post": "", "pretty": "∈" }, should give the intended result.

pancaek avatar Sep 02 '22 02:09 pancaek