From 56dc21fc77f4b8ecddd9bb240fd0f227aa2ad111 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Sat, 15 Feb 2025 11:35:50 +0100 Subject: [PATCH] Update page.tsx --- web/app/guides/[slug]/page.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/web/app/guides/[slug]/page.tsx b/web/app/guides/[slug]/page.tsx index cad2a64..0a5a2e6 100644 --- a/web/app/guides/[slug]/page.tsx +++ b/web/app/guides/[slug]/page.tsx @@ -38,9 +38,7 @@ export async function generateStaticParams() { } function wrapCodeBlocksWithCopyable(content: string) { - // Reemplazar los bloques de código con el componente CopyableCode const codeBlockRegex = /
([\s\S]*?)<\/code><\/pre>/g
-
return content.replace(codeBlockRegex, (match, code) => {
return ` `
})
@@ -51,13 +49,23 @@ export default async function GuidePage({ params }: { params: { slug: string } }
guideContent = wrapCodeBlocksWithCopyable(guideContent)
return (
-
-
+
+
)
}
+