From de24eac9a650f64b50e075fa91ffbc4edc231f2e Mon Sep 17 00:00:00 2001 From: Silberengel Date: Fri, 14 Nov 2025 09:20:35 +0100 Subject: [PATCH] make light-mode blocks more readable --- .../Note/MarkdownArticle/MarkdownArticle.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/Note/MarkdownArticle/MarkdownArticle.tsx b/src/components/Note/MarkdownArticle/MarkdownArticle.tsx index 2dd1025..8860f59 100644 --- a/src/components/Note/MarkdownArticle/MarkdownArticle.tsx +++ b/src/components/Note/MarkdownArticle/MarkdownArticle.tsx @@ -131,12 +131,11 @@ function CodeBlock({ id, code, language }: { id: string; code: string; language: return (
-
+      
         
           {code}
         
@@ -188,7 +187,7 @@ function InlineCode({ code, keyPrefix }: { code: string; keyPrefix: string }) {
         // On error, fall back to showing the code as-is
         if (elementRef.current) {
           elementRef.current.textContent = code
-          elementRef.current.className = 'bg-muted px-1 py-0.5 rounded text-sm font-mono'
+          elementRef.current.className = 'bg-muted px-1 py-0.5 rounded text-sm font-mono text-foreground'
         }
       }
     }
@@ -208,7 +207,7 @@ function InlineCode({ code, keyPrefix }: { code: string; keyPrefix: string }) {
   
   // Regular inline code
   return (
-    
+    
       {code}
     
   )
@@ -2933,6 +2932,10 @@ export default function MarkdownArticle({
         }
         .hljs {
           background: transparent !important;
+          color: #1f2937 !important;
+        }
+        .dark .hljs {
+          color: #f3f4f6 !important;
         }
         .hljs-keyword,
         .hljs-selector-tag,