Build your personal knowledge base with TriliumNext Notes
 
 
 
 
 
 
Go to file
Laurent Cozic 616cc129e2 Don't render the border of tables that contain other tables 2018-05-21 23:21:37 +07:00
config Add gfm plugins 2017-11-10 14:21:46 +07:00
src Don't render the border of tables that contain other tables 2018-05-21 23:21:37 +07:00
test Handle tables with no headers by creating an empty Markdown header 2018-05-17 01:01:36 +07:00
.gitignore Do not track test browser build 2017-11-24 11:20:42 +07:00
.travis.yml Add travis config 2017-12-15 08:36:34 +07:00
LICENSE Initial commit 2017-11-10 14:09:07 +07:00
README.md Use correct unpkg url for plugin 2017-12-18 14:03:52 +07:00
package-lock.json 1.0.2 2018-05-11 12:05:19 +07:00
package.json 1.0.2 2018-05-11 12:05:19 +07:00

README.md

turndown-plugin-gfm

A Turndown plugin which adds GitHub Flavored Markdown extensions.

Installation

npm:

npm install turndown-plugin-gfm

Browser:

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

Usage

// For Node.js
var TurndownService = require('turndown')
var turndownPluginGfm = require('turndown-plugin-gfm')

var gfm = turndownPluginGfm.gfm
var turndownService = new TurndownService()
turndownService.use(gfm)
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:

  • strikethrough (for converting <strike>, <s>, and <del> elements)
  • tables
  • taskListItems
  • gfm (which applies all of the above)

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

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

License

turndown-plugin-gfm is copyright © 2017+ Dom Christie and released under the MIT license.