Skip to content

Commit

Permalink
🎨 prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed May 23, 2024
1 parent 7afd6c2 commit fa203ed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/consolePrint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ class ConsoleBuffer {
}

#split(text: string): string[] {
const matches = text.matchAll(/(?=\p{Upper})|\s|[^\p{Upper}\s]{12}/gu)
const splits: string[] = []
let offset = 0
const matches = text.matchAll(/(?=\p{Upper})|\s|[^\p{Upper}\s]{12}/gu);
const splits: string[] = [];
let offset = 0;
for (const match of matches) {
const end = match.index + match[0].length
splits.push(text.slice(offset, end))
offset = end
const end = match.index + match[0].length;
splits.push(text.slice(offset, end));
offset = end;
}
splits.push(text.slice(offset))
splits.push(text.slice(offset));
return splits;
}
}

0 comments on commit fa203ed

Please sign in to comment.