diff --git a/web/app/changelog/page.tsx b/web/app/changelog/page.tsx index b67d22b..cbfaf2a 100644 --- a/web/app/changelog/page.tsx +++ b/web/app/changelog/page.tsx @@ -3,16 +3,16 @@ import path from "path" import { remark } from "remark" import html from "remark-html" -function markdownToHtml(markdown) { +function markdownToHtml(markdown: string): string { return markdown - .replace(/^### (.*$)/gim, "
$1
") // Convertir `código` en
- .replace(/^- (.*$)/gim, "- $1
") // Convertir listas en
- .replace(/\n/g, "
") // Mantener los saltos de línea
+ .replace(/^### (.*$)/gim, "$1
")
+ .replace(/^## (.*$)/gim, "$1
")
+ .replace(/^# (.*$)/gim, "$1
")
+ .replace(/\*\*(.*?)\*\*/gim, "$1")
+ .replace(/\*(.*?)\*/gim, "$1")
+ .replace(/`(.*?)`/gim, "$1
")
+ .replace(/^- (.*$)/gim, "- $1
")
+ .replace(/\n/g, "
");
}
async function getChangelog() {