wasm-voxel chat formatter: §o applies bold instead of italic #799

Open
opened 2026-07-22 11:38:23 +00:00 by spikerj · 0 comments
Owner

Component: libraries/game/wasm-voxel/src/_components/wasm-voxel/ts/libraries/chat.ts (convertOld)

The Minecraft italic formatting code §o maps to c.bold = true instead of c.italic = true (see case "o"). As a result, italic-coded chat text renders bold, and italic is never produced by convertOld at all. The bold code §l is handled correctly on its own line, so §o should read c.italic = true.

Upstream reference (janispritzkau/mc-chat-format, cited at the top of the file) maps o → italic.

Impact: cosmetic — italic-styled voxel-game chat shows as bold. Low priority.

Fix: one line — case "o": c.italic = true;.

Test: chat.spec.ts currently pins the buggy behavior (annotated LATENT BUG) in increment 45 of the frontend coverage wave (PR #540). When fixed, flip that assertion to { text: "Hi", italic: true }.

Found during the frontend test-coverage expansion (tests-only wave, so not fixed in that PR).

**Component:** `libraries/game/wasm-voxel/src/_components/wasm-voxel/ts/libraries/chat.ts` (`convertOld`) The Minecraft italic formatting code `§o` maps to `c.bold = true` instead of `c.italic = true` (see `case "o"`). As a result, italic-coded chat text renders **bold**, and `italic` is never produced by `convertOld` at all. The bold code `§l` is handled correctly on its own line, so `§o` should read `c.italic = true`. Upstream reference (`janispritzkau/mc-chat-format`, cited at the top of the file) maps `o` → italic. **Impact:** cosmetic — italic-styled voxel-game chat shows as bold. Low priority. **Fix:** one line — `case "o": c.italic = true;`. **Test:** `chat.spec.ts` currently pins the buggy behavior (annotated `LATENT BUG`) in increment 45 of the frontend coverage wave (PR #540). When fixed, flip that assertion to `{ text: "Hi", italic: true }`. Found during the frontend test-coverage expansion (tests-only wave, so not fixed in that PR).
Sign in to join this conversation.