@@ -10,7 +10,7 @@ var $$UMFP; // reference to $UrlMatcherFactoryProvider
10
10
* of search parameters. Multiple search parameter names are separated by '&'. Search parameters
11
11
* do not influence whether or not a URL is matched, but their values are passed through into
12
12
* the matched parameters returned by {@link ui.router.util.type:UrlMatcher#methods_exec exec}.
13
- *
13
+ *
14
14
* Path parameter placeholders can be specified using simple colon/catch-all syntax or curly brace
15
15
* syntax, which optionally allows a regular expression for the parameter to be specified:
16
16
*
@@ -21,13 +21,13 @@ var $$UMFP; // reference to $UrlMatcherFactoryProvider
21
21
* regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.
22
22
*
23
23
* Parameter names may contain only word characters (latin letters, digits, and underscore) and
24
- * must be unique within the pattern (across both path and search parameters). For colon
24
+ * must be unique within the pattern (across both path and search parameters). For colon
25
25
* placeholders or curly placeholders without an explicit regexp, a path parameter matches any
26
26
* number of characters other than '/'. For catch-all placeholders the path parameter matches
27
27
* any number of characters.
28
- *
28
+ *
29
29
* Examples:
30
- *
30
+ *
31
31
* * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for
32
32
* trailing slashes, and patterns have to match the entire path, not just a prefix.
33
33
* * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or
@@ -60,7 +60,7 @@ var $$UMFP; // reference to $UrlMatcherFactoryProvider
60
60
*
61
61
* @property {string } sourceSearch The search portion of the source property
62
62
*
63
- * @property {string } regex The constructed regex that will be used to match against the url when
63
+ * @property {string } regex The constructed regex that will be used to match against the url when
64
64
* it is time to determine which url will match.
65
65
*
66
66
* @returns {Object } New `UrlMatcher` object
@@ -119,7 +119,7 @@ function UrlMatcher(pattern, config, parentMatcher) {
119
119
cfg = config . params [ id ] ;
120
120
segment = pattern . substring ( last , m . index ) ;
121
121
regexp = isSearch ? m [ 4 ] : m [ 4 ] || ( m [ 1 ] == '*' ? '.*' : null ) ;
122
- type = $$UMFP . type ( regexp || "string" ) || inherit ( $$UMFP . type ( "string" ) , { pattern : new RegExp ( regexp ) } ) ;
122
+ type = $$UMFP . type ( regexp || "string" ) || inherit ( $$UMFP . type ( "string" ) , { pattern : new RegExp ( regexp , config . caseInsensitive ? 'i' : undefined ) } ) ;
123
123
return {
124
124
id : id , regexp : regexp , segment : segment , type : type , cfg : cfg
125
125
} ;
@@ -275,7 +275,7 @@ UrlMatcher.prototype.exec = function (path, searchParams) {
275
275
*
276
276
* @description
277
277
* Returns the names of all path and search parameters of this pattern in an unspecified order.
278
- *
278
+ *
279
279
* @returns {Array.<string> } An array of parameter names. Must be treated as read-only. If the
280
280
* pattern has no parameters, an empty array is returned.
281
281
*/
0 commit comments