md_parser_wasm 0.3.5

A markdown parser written in Rust and compiled to WebAssembly
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// #![feature(proc_macro, wasm_custom_section, wasm_import_module)]

pub mod parser;

extern crate wasm_bindgen;

extern crate console_error_panic_hook;

use wasm_bindgen::prelude::*;

#[wasm_bindgen]
pub fn parse(input: &str) -> String {
    std::panic::set_hook(Box::new(console_error_panic_hook::hook));
    let result = parser::parse(input.to_string());

    // log(&result);
    result
}