Skip to content

chbk/stripdown.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Stripdown.js

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.

Usage

Use stripdown() to convert text to HTML:

var htmlOutput = stripdown(textInput);

Stripdown.js will also safely escape all untrusted characters.

Syntax

The following patterns are supported:

Inline Styling

_italic text_

__bold text__

Code tags

`code`

Links

http://url.com

[link](url.com)

Lists

1. Numbered list

a. Lettered list

- Dashed list

Blockquotes

> Blockquote

Preformatted Text

    Preformatted text indented by 4 spaces

Demo

Live demo here.

About

A lightweight markdown parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published