1
Vote

Breaking Code Folding

description

The below example breaks the code folding. It looks like the offending character is the single quote in the regex character set.function test() { var foo = ''; if (!/^[A-Za-z']{1,30}$/.test('Stuff')) { foo = ''; } return foo;}

comments

fredclown wrote Mar 7, 2013 at 10:15 PM

I was able to work around the issue by using \x27 instead of a single quote.
function test() {
    var foo = '';
    if (!/^[A-Za-z\x27]{1,30}$/.test('Stuff')) {
        foo = '';
    }
    return foo;
}