0.0.2 • Published 8 years ago

metalsmith-tagcleaner v0.0.2

Weekly downloads
19
License
MIT
Repository
github
Last release
8 years ago

metalsmith-tagcleaner

Metalsmith plugin to remove paragraph tags from around images.

Installation

$ npm install metalsmith-tagcleaner --save

Usage

const metalsmith = require('metalsmith');
const markdown = require('metalsmith-markdown');
const tagcleaner = require('metalsmith-tagcleaner');

metalsmith(__dirname)
  .use(markdown())
  .use(tagcleaner())
  .build();

Example

![img alt](path/to/image.png)

[![alt text](http://www.metalsmith.io/)](path/to/image)

results in:

<img src="path/to/image.png" alt="img alt">

<a href="http://www.metalsmith.io/"><img src="path/to/image" alt="alt text" /></a>

instead of:

<p><img src="path/to/image.png" alt="img alt"></p>

<p><a href="http://www.metalsmith.io/"><img src="path/to/image" alt="alt text" /></a></p>

Compare markdown implementations

License

MIT