mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-07 13:30:33 +03:00
parent
633d71293f
commit
0904b3fec2
|
@ -512,7 +512,7 @@ export function mergeSimilarMediaTypes(
|
|||
|
||||
export function expandDefaultServerVariables(url: string, variables: object = {}) {
|
||||
return url.replace(
|
||||
/(?:{)(\w+)(?:})/g,
|
||||
/(?:{)([\w-.]+)(?:})/g,
|
||||
(match, name) => (variables[name] && variables[name].default) || match,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user