wk-j / vscode-rainbow-string

Add rainbow effect to quoted string
22 stars 9 forks source link

double and single quotes in regular expressions trigger highlighting #20

Open toloc42 opened 1 year ago

toloc42 commented 1 year ago

Having a regEx that contains single or double quotes triggers the highlighting until the next corresponding character, effectively inverting the highlighting behaviour.

Example;

const string1 = 'teststring1';
const regEx = /'/;
const string2 = 'teststring2';

This will enable the rainbow highlight from the closing slash of the regEx object to the opening single quote of string2, not highlighting the rest.

image