Newton's Preposterous Miscalculation

npm

Need private packages and team management tools?Check out npm Orgs. »

reshape-md

1.0.1 • Public • Published

Reshape Markdown Reshape

NPM Version Build Status Licensing Changelog Gitter Chat

Reshape Markdown lets you use Markdown in HTML.

<!-- before -->
<h1 md>Reshape **Markdown**</h1>
<div md>It knows *when* to work.</div>
<p md>It knows *how* to work.</p>
<md>It just [works](https://github.com/jonathantneal/reshape-md).</md>
 
<!-- after -->
<h1>Reshape <strong>Markdown</strong></h1>
<div><p>It knows <em>when</em> to work.</p></div>
<p>It knows <em>how</em> to work.</p>
<p>It just <a href="https://github.com/jonathantneal/reshape-md">works</a>.</p>

Usage

Add Reshape and Reshape Markdown to your build tool:

npm install reshape reshape-md --save-dev

Use Reshape Markdown as a plugin:

require('reshape')({
    plugins: [
        require('reshape-md')(/* Options */)
    ]
}).process(YOUR_HTML);

Options

elements

Type: Array
Default: [ "markdown", "md" ]

The list of elements which will be replaced with rendered Markdown.

attrs

Type: Array
Default: [ "markdown", "md" ]

The list of attributes on elements which will be replaced with rendered Markdown.

md

Type: Object
Default: {}

The hash of options applied to marked, the tool used to parse Markdown.

install

npm i reshape-md

Downloadsweekly downloads

9

version

1.0.1

license

CC0-1.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability