1.1.0 • Published 7 years ago

doubledown v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

DoubleDown

Super Lightweight Markdown-Style Parser

Overview

DoubleDown is a Markdown-inspired text parser primarily intended for sites with comment sections that might benefit from simple styling (e.g. Reddit). It uses a syntax similar to Markdown but with a much more restricted feature set, slight syntax modifications, and built-in HTML escaping to facilitate faster, simpler, and safer parsing.

Installation

npm install doubledown

Usage

import doubledown from 'doubledown';

const formatted_text = doubledown('Hello, **World!**'); // Hello, <strong>World!</strong>

Syntax

Apart from links, all features are triggered by surrounding text with a set of markers. As the double in DoubleDown implies, all markers are made up of sets of two characters. For instance, the bold marker is ** and can be used like so: **This text is bold.**