Add exSTATic support

This commit is contained in:
ZXY101
2024-03-09 12:02:13 +02:00
parent 18f5e3ae46
commit e511a0a39b
5 changed files with 54 additions and 5 deletions

View File

@@ -12,7 +12,8 @@ import type { Page } from "$lib/types";
export function countChars(line: string) {
const isNotJapaneseRegex = /[^0-9A-Z-------\p{Radical}\p{Unified_Ideograph}]+/gimu
const cleaned = line.replace(isNotJapaneseRegex, '')
return cleaned.length;
return Array.from(cleaned).length;
}
export function getCharCount(pages: Page[], currentPage?: number) {