Stripdown.js is a lightweight parser that recognizes a subset of markdown rules.
It is best used in website comment sections where full markdown editors are overkill.
Use stripdown()
to convert text to HTML:
var htmlOutput = stripdown(textInput);
Stripdown.js will also safely escape all untrusted characters.
The following patterns are supported:
_italic text_
__bold text__
`code`
http://url.com
[link](url.com)
1. Numbered list
a. Lettered list
- Dashed list
> Blockquote
Preformatted text indented by 4 spaces
Live demo here.