diff --git a/src/app/globals.css b/src/app/globals.css index 1b1a494..7e5f1ee 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -32,41 +32,9 @@ .hljs { background: #fafafa !important; padding: 1.5rem; - overflow-x: auto; -} - -.hljs-comment, -.hljs-quote { - color: #6b7280; - font-style: italic; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-built_in { - color: #1f2937; - font-weight: 600; -} - -.hljs-string, -.hljs-attr { - color: #374151; -} - -.hljs-number, -.hljs-literal { - color: #4b5563; -} - -.hljs-title, -.hljs-section { - color: #111827; - font-weight: 600; -} - -.hljs-type, -.hljs-class { - color: #1f2937; + white-space: pre-wrap; + word-break: break-word; + overflow-wrap: break-word; } /* Prose customizations */ @@ -74,6 +42,8 @@ background-color: #fafafa; border: 1px solid #e5e5e5; border-radius: 0; + white-space: pre-wrap; + word-break: break-word; } .prose code { diff --git a/src/components/post/PostContent.tsx b/src/components/post/PostContent.tsx index 1a99d79..54fdd58 100644 --- a/src/components/post/PostContent.tsx +++ b/src/components/post/PostContent.tsx @@ -13,7 +13,7 @@ export function PostContent({ content }: PostContentProps) {
( // eslint-disable-next-line @next/next/no-img-element @@ -24,7 +24,7 @@ export function PostContent({ content }: PostContentProps) { /> ), pre: ({ children }) => ( -
+            
               {children}
             
),