mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
fix(docs): remove spaces in type parameter brackets (#10127)
* fix(docs): remove spaces in type parameter brackets * fix: missing global flag
This commit is contained in:
@@ -325,11 +325,11 @@ export class ExcerptBuilder {
|
|||||||
// Remove BarTokens from excerpts if they immediately follow a LessThanToken, e.g. `Promise< | Something>`
|
// Remove BarTokens from excerpts if they immediately follow a LessThanToken, e.g. `Promise< | Something>`
|
||||||
// would become `Promise<Something>`
|
// would become `Promise<Something>`
|
||||||
if (/<(?:\s*\||\s+)/.test(prevToken.text)) {
|
if (/<(?:\s*\||\s+)/.test(prevToken.text)) {
|
||||||
prevToken.text = prevToken.text.replace(/<\s*\|?\s*/, '<');
|
prevToken.text = prevToken.text.replaceAll(/<\s*\|?\s*/g, '<');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/\s+>/.test(prevToken.text)) {
|
if (/\s+>/.test(prevToken.text)) {
|
||||||
prevToken.text = prevToken.text.replace(/\s*>/, '>');
|
prevToken.text = prevToken.text.replaceAll(/\s*>/g, '>');
|
||||||
}
|
}
|
||||||
|
|
||||||
mergeCount = 1;
|
mergeCount = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user