New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

doubledown

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doubledown

Super Lightweight Markdown-Style Parser

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

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.**

FeatureInputOutput
Link[Click Here](https://google.com)<a rel="nofollow noreferrer noopener" target="_blank" href="https://google.com">Click Here</a>
Code##var foo = 123;##<code>var foo = 123;</code>
Keyboard Shortcut$$Ctrl + S$$<kbd>Ctrl + S</kbd>
Quote@@This text is a quote@@<blockquote>This text is a quote</blockquote>
Bold**This text is bold**<strong>This text is bold</strong>
Italic//This text is italicized//<em>This text is italicized</em>
Underline__This text is underlined__<u>This text is underlined</u>
Strikethrough~~This text is struck through~~<s>This text is struck through</s>
Subscript%%This text is a subscript%%<sub>This text is a subscript</sub>
Superscript^^This text is a superscript^^<sup>This text is a superscript</sup>

Keywords

doubledown

FAQs

Package last updated on 02 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts