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 = "./";
22const DEFAULT_DELIMITER = "/" ;
33const GROUPS_RE = / \( (?: \? < ( .* ?) > ) ? (? ! \? ) / g;
44const 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;
66
77/**
88 * Encode a string into another string.
@@ -130,13 +130,8 @@ function lexer(str: string) {
130130 let name = "" ;
131131 let j = i + 1 ;
132132
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 ++ ] ;
140135 }
141136
142137 if ( ! name ) throw new TypeError ( `Missing parameter name at ${ i } ` ) ;
You can’t perform that action at this time.
0 commit comments