mirror of
https://github.com/thelounge/thelounge.git
synced 2026-07-30 14:45:49 -04:00
## What changed - Match nickname tokens with Unicode letters and numbers while preserving IRC nickname characters. - Use Unicode-aware word boundaries for nickname highlights. - Add regression coverage for Polish text, Unicode nicknames, and existing IRC nickname characters. ## Why The previous regular expressions used ASCII-only character classes. This caused a one-character nickname such as `D` to be detected inside words containing Polish diacritics, for example `dzięki`. ## Before / after | Before (v4.5.2) | After (this PR) | |:---:|:---:| |  |  | | Scenario | Before | After | |---|---|---| | Nick `Ądam42` appears in a message | Not recognized as a nick — rendered as plain text (no color, not clickable) | Recognized and colored like any other nick | | `Ćadam` / `adamć` with your nick `adam` | Falsely highlighted as a mention of you | Not highlighted | | Genuine mention `hey adam` | Highlighted | Highlighted (no regression) | <sub>Screenshots are a faithful reproduction rendered with TheLounge's real <code>client/css/style.css</code> and the actual old/new regexes (not a live IRC capture).</sub> ## Validation - Direct Unicode nickname extraction and boundary checks with Node.js 24 - Full Vitest/lint suite not run because repository dependencies were unavailable and dependency installation stalled in the local environment Fixes #4930