File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ module.exports = parse;
55var re_name = / ^ (?: \\ .| [ \w \- \u00c0 - \uFFFF ] ) + / ,
66 re_escape = / \\ ( [ \d a - f ] { 1 , 6 } \s ? | ( \s ) | .) / ig,
77 //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 ) ? \] / ;
99
1010var actionTypes = {
1111 __proto__ : null ,
Original file line number Diff line number Diff line change @@ -250,6 +250,21 @@ var tests = [
250250 ] ,
251251 "quoted attribute with spaces"
252252 ] ,
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+ ] ,
253268 [
254269 "[name=foo\\.baz]" ,
255270 [
You can’t perform that action at this time.
0 commit comments