Skip to content

armgit / clipy

Public Imported from GitHub
0

The AI-native screen recorder. Record your screen and talk; the people you share it with and your AI agents both get it.

desktop: rename #907's width mark pattern next to #830's search one

Claude100c7c3462a4
diff --git a/desktop/src/lib/transcriptLines.ts b/desktop/src/lib/transcriptLines.ts
index 24ff793..7585d46 100644
--- a/desktop/src/lib/transcriptLines.ts
+++ b/desktop/src/lib/transcriptLines.ts
@@ -50,12 +50,12 @@ function join(line: string, token: string): string {
*/
const WIDE_GLYPH =
/[\u1100-\u11FF\u2E80-\u303F\u3040-\u33FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFF60\uFFE0-\uFFE6]/;
-const COMBINING_MARK = /\p{M}/u;
+const WIDTHLESS_MARK = /\p{M}/u;
function width(text: string): number {
let total = 0;
for (const char of text) {
- if (COMBINING_MARK.test(char)) continue; // marks take no room: 0
+ if (WIDTHLESS_MARK.test(char)) continue; // marks take no room: 0
total += WIDE_GLYPH.test(char) ? 2 : 1;
}
return total;