feat: render markdown in posts and comments

This commit is contained in:
Tim
2025-07-04 15:59:57 +08:00
parent c6c34b201a
commit cdc9b412fe
5 changed files with 104 additions and 37 deletions

View File

@@ -0,0 +1,11 @@
import MarkdownIt from 'markdown-it'
const md = new MarkdownIt({
html: false,
linkify: true,
breaks: true
})
export function renderMarkdown(text) {
return md.render(text || '')
}