From 3438f0890368c0c19f35eed79eeac2a9ac7b703d Mon Sep 17 00:00:00 2001 From: Rajesh Malviya Date: Tue, 17 Jun 2025 20:39:52 +0530 Subject: [PATCH 1/2] content: Ignore KaTeX classes that don't have CSS definition --- lib/model/katex.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/model/katex.dart b/lib/model/katex.dart index fa724d1267..e6851dba7f 100644 --- a/lib/model/katex.dart +++ b/lib/model/katex.dart @@ -357,6 +357,11 @@ class _KatexParser { case 'mop': case 'mclose': case 'minner': + case 'mbin': + case 'mpunct': + case 'nobreak': + case 'allowbreak': + case 'mathdefault': // Ignore these classes because they don't have a CSS definition // in katex.scss, but we encounter them in the generated HTML. break; From 04989164bfed4cf203997a5331db37f276463e21 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Tue, 1 Jul 2025 21:33:25 -0700 Subject: [PATCH 2/2] content [nfc]: Explain why some KaTeX CSS classes are unused in its CSS --- lib/model/katex.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/model/katex.dart b/lib/model/katex.dart index e6851dba7f..64c5eea82b 100644 --- a/lib/model/katex.dart +++ b/lib/model/katex.dart @@ -364,6 +364,12 @@ class _KatexParser { case 'mathdefault': // Ignore these classes because they don't have a CSS definition // in katex.scss, but we encounter them in the generated HTML. + // (Why are they there if they're not used? The story seems to be: + // they were used in KaTeX's CSS in the past, before 2020 or so; and + // they're still used internally by KaTeX in producing the HTML. + // https://github.com/KaTeX/KaTeX/issues/2194#issuecomment-584703052 + // https://github.com/KaTeX/KaTeX/issues/3344 + // ) break; default: