From 9a77bd829aabe28c74212e324935f4ed5b49d707 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Thu, 22 May 2025 00:01:59 +0200 Subject: [PATCH] Show correct config link color in code boxes in dark mode Signed-off-by: Julius Volz --- src/rehypeConfigLinker.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rehypeConfigLinker.ts b/src/rehypeConfigLinker.ts index 8036e44a..fac474b4 100644 --- a/src/rehypeConfigLinker.ts +++ b/src/rehypeConfigLinker.ts @@ -69,7 +69,11 @@ export default function rehypeConfigLinker() { if (currentHtml.includes(html)) { currentHtml = currentHtml.replaceAll( html, - `${html}` + // invertInDarkMode is to counteract the inversion of the + // surrounding element in dark mode. The link color + // actually gets adjusted to the dark mode already, so we + // want to revert it to the original color. + `${html}` ); changed = true; }