From 3820ccac4b1da108ebfcabe418aab9f9b34e5c7b Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Sat, 15 Feb 2025 13:11:44 +0100 Subject: [PATCH 1/3] Update page.tsx --- web/app/guides/[slug]/page.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/web/app/guides/[slug]/page.tsx b/web/app/guides/[slug]/page.tsx index 03b07d3..d343d3a 100644 --- a/web/app/guides/[slug]/page.tsx +++ b/web/app/guides/[slug]/page.tsx @@ -22,11 +22,13 @@ export default async function GuidePage({ params }: { params: { slug: string } } const guideContent = await getGuideContent(params.slug) return ( -
-
+
+
+
+
) } From d5969b6d08c8c9dd19b7929a6d4b377cc9fe2de6 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Sat, 15 Feb 2025 13:15:27 +0100 Subject: [PATCH 2/3] Update page.tsx --- web/app/guides/[slug]/page.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/web/app/guides/[slug]/page.tsx b/web/app/guides/[slug]/page.tsx index d343d3a..fb77986 100644 --- a/web/app/guides/[slug]/page.tsx +++ b/web/app/guides/[slug]/page.tsx @@ -21,12 +21,22 @@ export async function generateStaticParams() { export default async function GuidePage({ params }: { params: { slug: string } }) { const guideContent = await getGuideContent(params.slug) + + const wrapCodeBlocks = (content: string) => { + return content.replace( + /
([\s\S]*?)<\/code><\/pre>/g,
+      (match, code) => ``,
+    )
+  }
+
+  const wrappedContent = wrapCodeBlocks(guideContent)
+
   return (
     
From 16befc41ac3c6ee54daa9a40dc0c15b554ab0d72 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Sat, 15 Feb 2025 13:25:53 +0100 Subject: [PATCH 3/3] Update page.tsx --- web/app/guides/[slug]/page.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/web/app/guides/[slug]/page.tsx b/web/app/guides/[slug]/page.tsx index fb77986..f47fbe8 100644 --- a/web/app/guides/[slug]/page.tsx +++ b/web/app/guides/[slug]/page.tsx @@ -21,7 +21,7 @@ export async function generateStaticParams() { export default async function GuidePage({ params }: { params: { slug: string } }) { const guideContent = await getGuideContent(params.slug) - + // Función para envolver los bloques de código con CopyableCode const wrapCodeBlocks = (content: string) => { return content.replace( /
([\s\S]*?)<\/code><\/pre>/g,
@@ -34,10 +34,7 @@ export default async function GuidePage({ params }: { params: { slug: string } }
   return (
     
-
+
)