1.0.0 • Published 7 years ago

markdown-it-unwrapped-image-fix v1.0.0

Weekly downloads
4
License
-
Repository
-
Last release
7 years ago

Free floating image links

Notes: This plugin solves a really specific problem and may not be right for you.

Description

When exporting to Markdown from certain sources (cough, Dropbox Paper cough) some image URLs don't get wrapped in appropriate Markdown syntax.

![alt text](http://image-url.com/image.jpg)

This plugin for markdown-it looks for unwrapped image URLs. It does match against valid image extensions before wrapping, and so tries to not mess with non-image URLs

Matched extensions are:

  • .jpg
  • .jpeg
  • .png
  • .gif

Again, this is a really specific problem, and this may not be a good solution for you.

Usage

Follows standard markdown-it plugin usage.

var md = require('markdown-it')()
var midif = require('markdown-it-dropbox-image-fix')

md.use(midif)

const html = md.render('# Your markdown here')