examples: add wasm online demo

This commit is contained in:
Noah Hellman 2023-02-05 19:41:11 +01:00
parent 908ba72812
commit 5a882764f7
7 changed files with 182 additions and 0 deletions

View file

@ -0,0 +1,10 @@
use wasm_bindgen::prelude::*;
#[must_use]
#[wasm_bindgen]
pub fn jotdown_render(djot: &str) -> String {
let events = jotdown::Parser::new(djot);
let mut html = String::new();
jotdown::html::push(events, &mut html);
html
}