File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export function expandUriTemplate(template, vars = {}) {
1717 if ( typeof template !== "string" )
1818 throw new TypeError ( "template must be a string" ) ;
1919
20- return template . replace ( / \{ ( [ ^ \ }] + ) \} / g, ( match , expression ) => {
20+ return template . replace ( / \{ ( [ ^ } ] + ) \} / g, ( match , expression ) => {
2121 return expandExpression ( expression , vars ) ;
2222 } ) ;
2323}
@@ -126,7 +126,7 @@ export function expandExpression(expression, vars) {
126126
127127 for ( const spec of varspecs ) {
128128 // parse varspec: name, explode (*), prefix (:len)
129- const m = / ^ ( [ A - Z a - z 0 - 9 _ \ .] + ) ( \* | (?: : ( \d + ) ) ) ? $ / . exec ( spec ) ;
129+ const m = / ^ ( [ A - Z a - z 0 - 9 _ . ] + ) ( \* | (?: : ( \d + ) ) ) ? $ / . exec ( spec ) ;
130130 if ( ! m ) throw new Error ( "Invalid varspec: " + spec ) ;
131131 const varname = m [ 1 ] ;
132132 const explode = m [ 2 ] === "*" ;
You can’t perform that action at this time.
0 commit comments