snootforge

chee/turndown-plugin-polar-bear

an extension for bear.app's markdown flavour for turndown

turndown-plugin-gfm

A Turndown plugin which adds extensions for Polar Bear, the markdown inspired markup language created for bear.app

Installation

npm:

  1. npm install turndown-plugin-polar-bear

Browser:

  1. <script src="https://unpkg.com/turndown/dist/turndown.js"></script>
  2. <script src="https://unpkg.com/turndown-plugin-gfm/dist/turndown-plugin-gfm.js"></script>

Usage

  1. // For Node.js
  2. var TurndownService = require('turndown')
  3. var turndownPluginPolarBear = require('turndown-plugin-polar-bear')
  4. var bear = turndownPluginPolarBear.bear
  5. var turndownService = new TurndownService()
  6. turndownService.use(bear)
  7. var markdown = turndownService.turndown('<strike>Hello world!</strike>')

turndown-plugin-gfm is a suite of plugins which can be applied individually. The available plugins are as follows:

So for example, if you only wish to convert tables:

  1. var tables = require('turndown-plugin-gfm').tables
  2. var turndownService = new TurndownService()
  3. turndownService.use(tables)

License

turndown-plugin-polar-bear is copyright © 2018+ chee and released under the MIT license. it is heavily based on turndown-plugin-gfm