Fork from snarkdown project (no PR accept from 1Y ...)
https://github.com/developit/snarkdown
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
4 years ago | |
---|---|---|
src | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
logo.png | 4 years ago | |
test.html | 4 years ago |
README.md
GMOsnark is a dead simple [Markdown] parser, forked from snarkdown
It's designed to be as minimal as possible, for constrained use-cases where a full Markdown parser would be inappropriate.
Features
- Fast: since it's basically one regex and a huge if statement
- Tiny: it's 1kb of gzipped ES3
- Simple: pass a Markdown string, get back an HTML string
- Note: Tables are supported
Usage
GMOsnark exports a single function, which parses a string of Markdown and returns a String of HTML. Couldn't be simpler.
Inside an HTML page
<script type="module">
import toHtml from "./index.js";
let md = document.getElementById("imput").value;
let html = toHtml(md);
document.getElementById("output").innerHTML = html;
</script>
License
This program is under MIT license [read the entire license file]