lucacasonato / comrak-wasm

WASM bindings for the comrak markdown renderer

Home Page:https://deno.land/x/comrak

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

comrak-wasm

deno doc

WASM bindings for the comrak markdown renderer.

Rust port of GitHub's cmark-gfm.

A 100% CommonMark and GFM compatible Markdown parser. The design is based on cmark, so familiarity with that will help.

How to use

import * as comrak from "https://deno.land/x/comrak@0.1.1/mod.ts";
await comrak.init();

comrak.markdownToHTML("Hello, **世界**!"); // <p>Hello, <strong>世界</strong>!</p>\n

The second argument is an options bag that can be used to customize parsing behaviour. The exact arguments can be found on the deno doc page.

Thanks

Thanks to the authors of comrak (Asherah Connor @kivikakk).

Additional thanks to the @denosaurs folks for the build.ts script this repo uses.

About

WASM bindings for the comrak markdown renderer

https://deno.land/x/comrak

License:MIT License


Languages

Language:TypeScript 61.4%Language:JavaScript 27.8%Language:Rust 10.5%Language:Makefile 0.2%