From 6dd48b5c253c29216dd8a9c56bf385d553418199 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 13 Jul 2026 13:26:38 +0200 Subject: [PATCH] fix: changelog page rendered literal **bold** markup instead of bold text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Entries are plain strings with occasional **bold**/`code` spans, never full markdown — added a tiny inline parser rather than pulling in react-markdown just for this. Co-Authored-By: Claude Sonnet 5 --- CHANGELOG.md | 5 ++++ apps/web/components/shared/changelog-list.tsx | 28 +++++++++++++++++-- apps/web/lib/changelog.ts | 9 +++++- apps/web/package.json | 2 +- package.json | 2 +- 5 files changed, 40 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 016b8d3..6702fae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to Epicure are documented here. This file is mirrored in-app at `/changelog` (and in the admin dashboard) via `apps/web/lib/changelog.ts` — update both together. +## 0.12.1 — 2026-07-13 13:25 + +### Fixed +- Changelog entries showed literal `**bold**` markup instead of rendering it. + ## 0.12.0 — 2026-07-13 12:52 ### Added diff --git a/apps/web/components/shared/changelog-list.tsx b/apps/web/components/shared/changelog-list.tsx index 0439a3b..3ba82f6 100644 --- a/apps/web/components/shared/changelog-list.tsx +++ b/apps/web/components/shared/changelog-list.tsx @@ -1,7 +1,29 @@ +import { Fragment } from "react"; import { Badge } from "@/components/ui/badge"; import { Separator } from "@/components/ui/separator"; import { CHANGELOG } from "@/lib/changelog"; +// Changelog entries are plain strings with occasional **bold** and `code` +// spans — never full markdown (lists, links, headings) — so a tiny inline +// parser is enough and keeps this off the react-markdown dependency used for +// full AI chat output elsewhere. +function InlineMarkdown({ text }: { text: string }) { + const parts = text.split(/(\*\*[^*]+\*\*|`[^`]+`)/g).filter(Boolean); + return ( + <> + {parts.map((part, i) => { + if (part.startsWith("**") && part.endsWith("**")) { + return {part.slice(2, -2)}; + } + if (part.startsWith("`") && part.endsWith("`")) { + return {part.slice(1, -1)}; + } + return {part}; + })} + + ); +} + export function ChangelogList() { return (
@@ -18,7 +40,7 @@ export function ChangelogList() {

Added

    - {entry.added.map((line, j) =>
  • {line}
  • )} + {entry.added.map((line, j) =>
  • )}
)} @@ -27,7 +49,7 @@ export function ChangelogList() {

Fixed

    - {entry.fixed.map((line, j) =>
  • {line}
  • )} + {entry.fixed.map((line, j) =>
  • )}
)} @@ -36,7 +58,7 @@ export function ChangelogList() {

Security

    - {entry.security.map((line, j) =>
  • {line}
  • )} + {entry.security.map((line, j) =>
  • )}
)} diff --git a/apps/web/lib/changelog.ts b/apps/web/lib/changelog.ts index cf95868..9deb656 100644 --- a/apps/web/lib/changelog.ts +++ b/apps/web/lib/changelog.ts @@ -1,5 +1,5 @@ // Mirrors CHANGELOG.md at the repo root — update both together. -export const APP_VERSION = "0.12.0"; +export const APP_VERSION = "0.12.1"; export type ChangelogEntry = { version: string; @@ -11,6 +11,13 @@ export type ChangelogEntry = { }; export const CHANGELOG: ChangelogEntry[] = [ + { + version: "0.12.1", + date: "2026-07-13 13:25", + fixed: [ + "Changelog entries showed literal `**bold**` markup instead of rendering it.", + ], + }, { version: "0.12.0", date: "2026-07-13 12:52", diff --git a/apps/web/package.json b/apps/web/package.json index 4e9957f..720282d 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@epicure/web", - "version": "0.12.0", + "version": "0.12.1", "private": true, "scripts": { "dev": "next dev", diff --git a/package.json b/package.json index 6cf91d5..f49837b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "epicure", - "version": "0.12.0", + "version": "0.12.1", "private": true, "scripts": { "dev": "pnpm --filter web dev",