File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const DEFAULT_PREFIXES = "./";
2
2
const DEFAULT_DELIMITER = "/" ;
3
3
const GROUPS_RE = / \( (?: \? < ( .* ?) > ) ? (? ! \? ) / g;
4
4
const NOOP_VALUE = ( value : string ) => value ;
5
- const NAME_RE = / ^ [ \p{ L} \p{ Nl} \p{ Mn} \p{ Mc} \p{ Nd} \p{ Pc} ] $ / u;
5
+ const NAME_RE = / ^ [ \p{ L} \p{ Nl} \p{ Mn} \p{ Mc} \p{ Nd} \p{ Pc} $ ] $ / u;
6
6
7
7
/**
8
8
* Encode a string into another string.
@@ -130,13 +130,8 @@ function lexer(str: string) {
130
130
let name = "" ;
131
131
let j = i + 1 ;
132
132
133
- while ( j < chars . length ) {
134
- if ( NAME_RE . test ( chars [ j ] ) ) {
135
- name += chars [ j ++ ] ;
136
- continue ;
137
- }
138
-
139
- break ;
133
+ while ( NAME_RE . test ( chars [ j ] ) ) {
134
+ name += chars [ j ++ ] ;
140
135
}
141
136
142
137
if ( ! name ) throw new TypeError ( `Missing parameter name at ${ i } ` ) ;
You can’t perform that action at this time.
0 commit comments