File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ module.exports = parse;
5
5
var re_name = / ^ (?: \\ .| [ \w \- \u00c0 - \uFFFF ] ) + / ,
6
6
re_escape = / \\ ( [ \d a - f ] { 1 , 6 } \s ? | ( \s ) | .) / ig,
7
7
//modified version of https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L87
8
- re_attr = / ^ \s * ( (?: \\ .| [ \w \u00c0 - \uFFFF \- ] ) + ) \s * (?: ( \S ? ) = \s * (?: ( [ ' " ] ) ( . * ?) \3| ( # ? (?: \\ .| [ \w \u00c0 - \uFFFF \- ] ) * ) | ) | ) \s * ( i ) ? \] / ;
8
+ re_attr = / ^ \s * ( (?: \\ .| [ \w \u00c0 - \uFFFF \- ] ) + ) \s * (?: ( \S ? ) = \s * (?: ( [ ' " ] ) ( [ ^ ] * ?) \3| ( # ? (?: \\ .| [ \w \u00c0 - \uFFFF \- ] ) * ) | ) | ) \s * ( i ) ? \] / ;
9
9
10
10
var actionTypes = {
11
11
__proto__ : null ,
Original file line number Diff line number Diff line change @@ -250,6 +250,21 @@ var tests = [
250
250
] ,
251
251
"quoted attribute with spaces"
252
252
] ,
253
+ [
254
+ "[value=\"\nsome text\n\"]" ,
255
+ [
256
+ [
257
+ {
258
+ "type" : "attribute" ,
259
+ "name" : "value" ,
260
+ "action" : "equals" ,
261
+ "value" : "\nsome text\n" ,
262
+ "ignoreCase" : false
263
+ }
264
+ ]
265
+ ] ,
266
+ "quoted attribute with internal newline"
267
+ ] ,
253
268
[
254
269
"[name=foo\\.baz]" ,
255
270
[
You can’t perform that action at this time.
0 commit comments