mirror of
https://github.com/discordjs/discord.js.git
synced 2024-07-08 02:01:19 +12:00
fix: path generation for search
This commit is contained in:
parent
4a5e9fc1de
commit
e5f3f3130e
|
@ -54,8 +54,9 @@ export function generatePath(items: readonly ApiItem[], version: string) {
|
|||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line prefer-named-capture-group
|
||||
return path.replace(/@discordjs\/(.*)\/(.*)?/, `$1/${version}/$2`);
|
||||
return path.includes('@discordjs/')
|
||||
? path.replace(/@discordjs\/(.*)\/(.*)?/, `$1/${version}/$2`)
|
||||
: path.replace(/(.*)\/(.*)?/, `$1/${version}/$2`);
|
||||
}
|
||||
|
||||
export function resolveDocComment(item: ApiDeclaredItem) {
|
||||
|
|
Loading…
Reference in a new issue