style: apply oxfmt
This commit is contained in:
1 parent
b659db0a5b
commit
0c93b9b7bb
21 files changed
+87
-89
No files matched your search
@@ -68,7 +68,10 @@ export function markdownToText(markdown: string): string {
|
||||
return normalizeWhitespace(text);
|
||||
}
|
||||
|
||||
export function truncateText(value: string, maxChars: number): { text: string; truncated: boolean } {
|
||||
export function truncateText(
|
||||
value: string,
|
||||
maxChars: number,
|
||||
): { text: string; truncated: boolean } {
|
||||
if (value.length <= maxChars) return { text: value, truncated: false };
|
||||
return { text: value.slice(0, maxChars), truncated: true };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user