feat(web): live markdown preview via POST /_md host glue

Markdown form fields render a dual-pane shell; official boot posts textarea input to /_md for GFM HTML without author business JS.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-18 13:01:43 +08:00
1 parent 4b7643d833
commit 6bd127a313
5 files changed
+77 -2

No files matched your search

+5
View File
@@ -10,6 +10,11 @@ import (
"github.com/yuin/goldmark/renderer/html"
)
// MarkdownToHTML renders Markdown to an article-body HTML fragment (GFM subset).
func MarkdownToHTML(md string) string {
return markdownToHTML(md)
}
// markdownToHTML renders article body Markdown to HTML (GFM subset), matching
// the Rust web plugin's pulldown-cmark path.
func markdownToHTML(md string) string {