onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.84k stars 282 forks source link

JS syntax highlighting turning off and on #2292

Open tristil opened 4 years ago

tristil commented 4 years ago

Every time I save this file the syntax highlighting on this JS file toggles between the theme (Gruvbox Dark Medium) and something else. It only happens if you have the import statement in the file.

toggling

reed-jones commented 4 years ago

I have this too using default (laserwave I think). it seems to fully toggle syntax highlighting with every save

mabuchner commented 4 years ago

Could be related to or maybe is the same as #2027.

bpingris commented 4 years ago

Hey just out of curiosity is there any ideas on how to solve this issue ? Will it be fixed for the current sprint or it's not a priority ? Thanks!

marcinkoziej commented 3 years ago

A minimal example where clearly it's hard to figure out ( ) inside [ ] inside regular expression.

onivim-parens-regexp

A harder example is the killer url regexp:

export const urlPattern = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/;