fix: use no-modules WASM target for simpler loading

This commit is contained in:
Accusys
2026-05-18 11:33:55 +08:00
parent e61ff88bf8
commit a1ac722b2f
8 changed files with 464 additions and 69 deletions

10
md_wasm/src/lib.rs Normal file
View File

@@ -0,0 +1,10 @@
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn render(md: &str) -> String {
let parser = pulldown_cmark::Parser::new(md);
let mut html = String::new();
pulldown_cmark::html::push_html(&mut html, parser);
html = html.replace("<table>", "<table class=\"table\">");
html
}