From c873c9fc88a6a515c318da7e1eac20b5fe44130f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Thu, 22 Oct 2026 13:59:05 +0200 Subject: [PATCH] desktop: Fix math rendering in markdown The sanitizer allowlist strips KaTeX's markup, and index.html never loaded katex.min.css, so math has only ever shown up as flat text. We now typeset math after sanitizing and load the stylesheet. --- desktop/index.html | 1 + desktop/src/lib/markdown.ts | 53 ++++++++++++++++--- .../tests/e2e/repo/markdownRendering.spec.ts | 12 ++++- desktop/tests/unit/markdownMath.test.ts | 26 +++++++++ 4 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 desktop/tests/unit/markdownMath.test.ts diff --git a/desktop/index.html b/desktop/index.html index 5c396c42f..c57a45880 100644 --- a/desktop/index.html +++ b/desktop/index.html @@ -66,6 +66,7 @@ +