A tiny markdown to html formatter
Only a part of markdown is included. See formatting table below.
$ npm install tiny-mark
<script src="https://cdn.jsdelivr.net/npm/tiny-mark@1/dist/browser/tinymark.min.js"></script>
Exported as a global function
tinymark
import tinymark from "tiny-mark";
// or if you're using plain js
const tinymark = require("tiny-mark");
tinymark("*foo*");
// => "<b>foo</b>"
tinymark("_foo_");
// => "<em>foo</em>"
tinymark("_*foo*_");
// => "<em><b>foo</b></em>"
tinymark("*long _foo* bar_");
// => "<b>long <em>foo</em></b><em> bar</em>"
tinymark("*_foo_ \n bar*");
// => "<b><em>foo</em> <br /> bar</b>"
Syntax | Formatting | Status |
---|---|---|
*bold* | Bold (<b> ) |
✅ Added |
_italic_ | Emphasis (<em> ) |
✅ Added |
new\nline | Break (<br /> ) |
✅ Added |
[Google](https://google.com) | Link | 👀 Coming Soon |