We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 060f4a4 commit 0e6be40Copy full SHA for 0e6be40
1 file changed
extensions/irc/src/client.ts
@@ -33,6 +33,10 @@ function takeIrcPrivmsgChunk(text: string, maxChars: number, maxBytes: number):
33
return text;
34
}
35
const fitted = text.slice(0, end);
36
+ // A delimiter just beyond the cap already gives this chunk a clean word boundary.
37
+ if (text[end] === " ") {
38
+ return fitted;
39
+ }
40
const splitAt = fitted.lastIndexOf(" ");
41
if (splitAt >= Math.floor(fitted.length / 2)) {
42
return fitted.slice(0, splitAt);
0 commit comments