mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-07-08 17:36:53 +00:00
Update page.tsx
This commit is contained in:
parent
b43b0ae19b
commit
5620fe52f1
@ -3,16 +3,16 @@ import path from "path"
|
|||||||
import { remark } from "remark"
|
import { remark } from "remark"
|
||||||
import html from "remark-html"
|
import html from "remark-html"
|
||||||
|
|
||||||
function markdownToHtml(markdown) {
|
function markdownToHtml(markdown: string): string {
|
||||||
return markdown
|
return markdown
|
||||||
.replace(/^### (.*$)/gim, "<h3>$1</h3>") // Convertir ### en <h3>
|
.replace(/^### (.*$)/gim, "<h3>$1</h3>")
|
||||||
.replace(/^## (.*$)/gim, "<h2>$1</h2>") // Convertir ## en <h2>
|
.replace(/^## (.*$)/gim, "<h2>$1</h2>")
|
||||||
.replace(/^# (.*$)/gim, "<h1>$1</h1>") // Convertir # en <h1>
|
.replace(/^# (.*$)/gim, "<h1>$1</h1>")
|
||||||
.replace(/\*\*(.*?)\*\*/gim, "<b>$1</b>") // Convertir **negrita** en <b>
|
.replace(/\*\*(.*?)\*\*/gim, "<b>$1</b>")
|
||||||
.replace(/\*(.*?)\*/gim, "<i>$1</i>") // Convertir *cursiva* en <i>
|
.replace(/\*(.*?)\*/gim, "<i>$1</i>")
|
||||||
.replace(/`(.*?)`/gim, "<code>$1</code>") // Convertir `código` en <code>
|
.replace(/`(.*?)`/gim, "<code>$1</code>")
|
||||||
.replace(/^- (.*$)/gim, "<ul><li>$1</li></ul>") // Convertir listas en <ul>
|
.replace(/^- (.*$)/gim, "<ul><li>$1</li></ul>")
|
||||||
.replace(/\n/g, "<br />") // Mantener los saltos de línea
|
.replace(/\n/g, "<br />");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChangelog() {
|
async function getChangelog() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user