Jam Balaya 0d838fa69d Fix Unicode nickname matching (#5121)
## 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) |
|:---:|:---:|
|
![Before](https://raw.githubusercontent.com/JamBalaya56562/thelounge/pr5121-assets/pr5121-before.png)
|
![After](https://raw.githubusercontent.com/JamBalaya56562/thelounge/pr5121-assets/pr5121-after.png)
|

| 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
2026-07-15 20:16:44 -07:00
2022-06-18 17:25:21 -07:00
2023-12-24 16:55:45 +01:00
2026-07-14 13:12:57 -07:00
2019-11-01 13:47:18 +02:00
2026-07-13 11:40:38 -07:00
2018-01-11 17:12:04 +02:00
2026-07-11 18:18:26 -07:00
2026-07-11 18:17:52 -07:00
2022-06-18 17:25:21 -07:00
2019-11-01 13:47:18 +02:00
2026-06-11 21:40:58 -07:00
2022-04-13 21:48:21 +02:00
2022-06-18 17:25:21 -07:00

The Lounge

Modern web IRC client designed for self-hosting

WebsiteDocsDemoDocker

#thelounge IRC channel on Libera.Chat npm version Build Status

Overview

  • Modern features brought to IRC. Push notifications, link previews, new message markers, and more bring IRC to the 21st century.
  • Always connected. Remains connected to IRC servers while you are offline.
  • Cross platform. It doesn't matter what OS you use, it just works wherever Node.js runs.
  • Responsive interface. The client works smoothly on every desktop, smartphone and tablet.
  • Synchronized experience. Always resume where you left off no matter what device.

To learn more about configuration, usage and features of The Lounge, take a look at the website.

The Lounge is the official and community-managed fork of Shout, by Mattias Erming.

Installation and usage

The Lounge requires latest Node.js LTS version or more recent. The Yarn package manager is also recommended. If you want to install with npm, --unsafe-perm is required for a correct install.

Running stable releases

Please refer to the install and upgrade documentation on our website for all available installation methods.

Running from source

The following commands install and run the development version of The Lounge:

git clone https://github.com/thelounge/thelounge.git
cd thelounge
yarn install
NODE_ENV=production yarn build
yarn start

When installed like this, thelounge executable is not created. Use node index <command> to run commands.

⚠️ While it is the most recent codebase, this is not production-ready! Run at your own risk. It is also not recommended to run this as root.

Development setup

Simply follow the instructions to run The Lounge from source above, on your own fork.

Before submitting any change, make sure to:

  • Read the Contributing instructions
  • Run yarn test to execute linters and the test suite
    • Run yarn format:prettier if linting fails
  • Run yarn build:client if you change or add anything in client/js or client/components
    • The built files will be output to public/ by webpack
  • Run yarn build:server if you change anything in server/
    • The built files will be output to dist/ by tsc
  • yarn dev can be used to start The Lounge with hot module reloading

To ensure that you don't commit files that fail the linting, you can install a pre-commit git hook. Execute yarn githooks-install to do so.

Description
No description provided
Readme MIT 60 MiB
Languages
TypeScript 63%
Vue 23.7%
CSS 7.3%
JavaScript 5.7%
HTML 0.3%