tokenized.push({ selector: selector, body: body });
} else if (what == 'bodyEnd') {
+ // extra closing brace at the top level can be safely ignored
+ if (context.mode == 'top' && data[context.cursor] == '}') {
+ context.cursor += 1;
+ continue;
+ }
+
if (context.mode != 'block') {
tokenized = data.substring(context.cursor, nextSpecial);
}
'duplicate selectors with disabled advanced processing': cssContext({
'of a duplicate selector': 'a,a{color:red}'
}, { noAdvanced: true }),
+ 'invalid data tokenization': cssContext({
+ 'extra top-level closing brace': [
+ 'a{color:red}}p{width:auto}',
+ 'a{color:red}p{width:auto}'
+ ],
+ 'extra top-level closing braces': [
+ 'a{color:red}}}}p{width:auto}',
+ 'a{color:red}p{width:auto}'
+ ]
+ }),
'duplicate selectors in a list': cssContext({
'of a duplicate selector': [
'a,a{color:red}',