mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 19:44:30 +00:00
chore: Lint extensions folder.
This commit is contained in:
@@ -61,9 +61,15 @@ export function stripMarkdownForTwitch(markdown: string): string {
|
||||
export function chunkTextForTwitch(text: string, limit: number): string[] {
|
||||
// First, strip markdown
|
||||
const cleaned = stripMarkdownForTwitch(text);
|
||||
if (!cleaned) return [];
|
||||
if (limit <= 0) return [cleaned];
|
||||
if (cleaned.length <= limit) return [cleaned];
|
||||
if (!cleaned) {
|
||||
return [];
|
||||
}
|
||||
if (limit <= 0) {
|
||||
return [cleaned];
|
||||
}
|
||||
if (cleaned.length <= limit) {
|
||||
return [cleaned];
|
||||
}
|
||||
|
||||
const chunks: string[] = [];
|
||||
let remaining = cleaned;
|
||||
|
||||
Reference in New Issue
Block a user