From 8fc1804ccedc5aaddd76da0c3ad85dfcd1ddb2a6 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Sat, 15 Feb 2025 11:10:35 +0100 Subject: [PATCH] Update page.tsx --- web/app/guides/[slug]/page.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/web/app/guides/[slug]/page.tsx b/web/app/guides/[slug]/page.tsx index cd4aab2..75428cc 100644 --- a/web/app/guides/[slug]/page.tsx +++ b/web/app/guides/[slug]/page.tsx @@ -38,11 +38,15 @@ export async function generateStaticParams() { } function wrapCodeBlocksWithCopyable(content: string) { - // Expresión regular mejorada para detectar bloques de código y aplicar CopyableCode directamente + // Detectar bloques de código y aplicar estilos correctos const codeBlockRegex = /
([\s\S]*?)<\/code><\/pre>/g
 
   return content.replace(codeBlockRegex, (match, code) => {
-    return ``
+    return `
+      
+ +
+ ` }) } @@ -57,9 +61,8 @@ export default async function GuidePage({ params }: { params: { slug: string } } className="prose prose-gray max-w-none [&>h1]:text-gray-900 [&>h2]:text-gray-800 [&>h3]:text-gray-700 [&>p]:text-gray-600 [&>ul>li]:text-gray-600 [&>ol>li]:text-gray-600" - > - - + dangerouslySetInnerHTML={{ __html: guideContent }} + /> )