mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
refactor: minify api.json by shortening keys (#9971)
* refactor: minify api.json by shortening keys * fix: links to other packages * refactor: get doclink from canonicalReference, not model * fix: types * fix: again * fix: @link tags with alt texts
This commit is contained in:
@@ -212,7 +212,11 @@ interface IProcessAstEntityContext {
|
||||
|
||||
const linkRegEx = /{@link\s(?<class>\w+)#(?<event>event:)?(?<prop>[\w()]+)(?<name>\s[^}]*)?}/g;
|
||||
function fixLinkTags(input?: string): string | undefined {
|
||||
return input?.replaceAll(linkRegEx, '{@link $<class>.$<prop>$<name>}');
|
||||
return input?.replaceAll(
|
||||
linkRegEx,
|
||||
(_match, _p1, _p2, _p3, _p4, _offset, _string, groups) =>
|
||||
`{@link ${groups.class}.${groups.prop}${groups.name ? ` |${groups.name}` : ''}}`,
|
||||
);
|
||||
}
|
||||
|
||||
function filePathFromJson(meta: DocgenMetaJson): string {
|
||||
|
||||
Reference in New Issue
Block a user