From 595ffff459c0845ee25dc1b9e35c673a2bc33fe8 Mon Sep 17 00:00:00 2001 From: Ismaxis Date: Sun, 30 Nov 2025 20:35:05 +0300 Subject: [PATCH 1/2] Fix word capitalization by using codepoints --- jacow.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jacow.typ b/jacow.typ index 8015e76..57295c3 100644 --- a/jacow.typ +++ b/jacow.typ @@ -133,7 +133,7 @@ words += txt.matches(regex("()(\\w{4,})")) // words with 4+ letters for m in words { let (pre, word) = m.captures - word = upper(word.at(0)) + word.slice(1) + word = upper(word.codepoints().at(0)) + word.codepoints().slice(1).join("") txt = txt.slice(0, m.start) + pre + word + txt.slice(m.end) } txt From e115ba34b39349af6743084f39cee0b1d7e18b7b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 30 Nov 2025 17:41:23 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- jacow.typ | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jacow.typ b/jacow.typ index 57295c3..8b4054a 100644 --- a/jacow.typ +++ b/jacow.typ @@ -133,7 +133,9 @@ words += txt.matches(regex("()(\\w{4,})")) // words with 4+ letters for m in words { let (pre, word) = m.captures - word = upper(word.codepoints().at(0)) + word.codepoints().slice(1).join("") + word = ( + upper(word.codepoints().at(0)) + word.codepoints().slice(1).join("") + ) txt = txt.slice(0, m.start) + pre + word + txt.slice(m.end) } txt