File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ function tokensToFunction (tokens) {
223
223
* @return {string }
224
224
*/
225
225
function escapeString ( str ) {
226
- return str . replace ( / ( [ . + * ? = ^ ! : $ { } ( ) [ \] | \/ ] ) / g, '\\$1' )
226
+ return str . replace ( / ( [ . + * ? = ^ ! : $ { } ( ) [ \] | \/ \\ ] ) / g, '\\$1' )
227
227
}
228
228
229
229
/**
Original file line number Diff line number Diff line change @@ -1497,6 +1497,28 @@ var TESTS: Test[] = [
1497
1497
[ { '0' : '123' } , '/123' ]
1498
1498
]
1499
1499
] ,
1500
+ [
1501
+ '/route\\(\\\\(\\d+\\\\)\\)' ,
1502
+ null ,
1503
+ [
1504
+ '/route(\\' ,
1505
+ {
1506
+ name : 0 ,
1507
+ prefix : '' ,
1508
+ delimiter : '/' ,
1509
+ optional : false ,
1510
+ repeat : false ,
1511
+ partial : false ,
1512
+ asterisk : false ,
1513
+ pattern : '\\d+\\\\'
1514
+ } ,
1515
+ ')'
1516
+ ] ,
1517
+ [
1518
+ [ '/route(\\123\\)' , [ '/route(\\123\\)' , '123\\' ] ]
1519
+ ] ,
1520
+ [ ]
1521
+ ] ,
1500
1522
1501
1523
/**
1502
1524
* Regexps.
You can’t perform that action at this time.
0 commit comments