Skip to content

Repository files navigation

Pinching hand emoji

npm bundle size

tiny-mark

A tiny markdown to html formatter

Only a part of markdown is included. See formatting table below.

Install

Node

$ npm install tiny-mark

Browser

<scriptsrc="https://cdn.jsdelivr.net/npm/tiny-mark@1/dist/browser/tinymark.min.js"></script>

Exported as a global function tinymark

Usage

importtinymarkfrom"tiny-mark";// or if you're using plain jsconsttinymark=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>"

Formatting Table

SyntaxFormattingStatus
*bold*Bold (<b>)✅ Added
_italic_Emphasis (<em>)✅ Added
new\nlineBreak (<br />)✅ Added
[Google](https://google.com)Link👀 Coming Soon

About

A tiny markdown to html formatter

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages