fix: use no-modules WASM target for simpler loading
This commit is contained in:
10
md_wasm/src/lib.rs
Normal file
10
md_wasm/src/lib.rs
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user