Regex expression breaks syntax highlighting
skattwood opened this issue · 2 comments
skattwood commented
Here is some example code that breaks the syntax highlighting:
var str = "This is a \"quote\" test";
str.replace(/["]/g, '');
// Example function
function foo() {
console.log("foo");
}
// Example function 2
function bar(arg) {
console.log("bar");
}
str2 = "this is a test string";
foo();
bar();
skattwood commented
santisiri commented
Same here with a simple regexp like this:
var regexp = /^[A-Za-z'-\s]+$/
return regexp.test(username);