File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,13 @@ function attributeMatch(match, content) {
113
113
} ) ;
114
114
}
115
115
116
+ function invalidMatch ( match ) {
117
+ this . selector . nodes . push ( {
118
+ type : "invalid" ,
119
+ value : match
120
+ } ) ;
121
+ }
122
+
116
123
function irrelevantSpacingStartMatch ( match ) {
117
124
this . selector . before = match ;
118
125
}
@@ -171,7 +178,8 @@ var parser = new Parser({
171
178
"(\\s*),(\\s*)" : nextSelectorMatch ,
172
179
"\\s+$" : irrelevantSpacingEndMatch ,
173
180
"^\\s+" : irrelevantSpacingStartMatch ,
174
- "\\s+" : spacingMatch
181
+ "\\s+" : spacingMatch ,
182
+ "." : invalidMatch
175
183
} ,
176
184
inBrackets : {
177
185
"/\\*[\\s\\S]*?\\*/" : addToCurrent ,
Original file line number Diff line number Diff line change @@ -300,6 +300,21 @@ module.exports = {
300
300
] )
301
301
] ,
302
302
303
+ "invalid chars" : [
304
+ "a'b/c\"d[e" ,
305
+ singleSelector ( [
306
+ { type : "element" , name : "a" } ,
307
+ { type : "invalid" , value : "'" } ,
308
+ { type : "element" , name : "b" } ,
309
+ { type : "invalid" , value : "/" } ,
310
+ { type : "element" , name : "c" } ,
311
+ { type : "invalid" , value : "\"" } ,
312
+ { type : "element" , name : "d" } ,
313
+ { type : "invalid" , value : "[" } ,
314
+ { type : "element" , name : "e" }
315
+ ] )
316
+ ] ,
317
+
303
318
"invalid nesting" : [
304
319
"a ) b" ,
305
320
singleSelector ( [
You can’t perform that action at this time.
0 commit comments