turnish-plugin-gfm
v1.0.1
Published
Turnish plugin to add GitHub Flavored Markdown extensions.
Downloads
223
Maintainers
Readme
turnish-plugin-gfm
A Turnish plugin which adds GitHub Flavored Markdown extensions.
This is originally based on @joplin/turndown-plugin-gfm by Laurent Cozic, which is a fork of turndown-plugin-gfm by Dom Christie.
turnish-plugin-gfm vs @joplin/turndown-plugin-gfm
0538bf0
Installation
npm:
npm install turnish-plugin-gfmyarn:
yarn add turnish-plugin-gfmpnpm:
pnpm add turnish-plugin-gfmBrowser:
<script src="https://cdn.jsdelivr.net/npm/turnish-plugin-gfm@latest/dist/index.iife.js"></script>Usage
For Node.js:
const TurnishService = require('turnish')
const turnishPluginGfm = require('turnish-plugin-gfm')
const gfm = turnishPluginGfm.gfm
const turnishService = new TurnishService()
turnishService.use(gfm)
const markdown = turnishService.turnish('<strike>Hello world!</strike>')ES module import (Node with ESM, bundlers, or browsers supporting modules):
import TurnishService from 'turnish'
import turnishPluginGfm from 'turnish-plugin-gfm'
const gfm = turnishPluginGfm.gfm
const turnishService = new TurnishService()
turnishService.use(gfm)
const markdown = turnishService.turnish('<strike>Hello world!</strike>')turnish-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)tablestaskListItemsgfm(which applies all of the above)
So for example, if you only wish to convert tables:
const tables = require('turnish-plugin-gfm').tables
const turndownService = new TurndownService()
turndownService.use(tables)License
- Copyright (c) 2026- Manabu Nakazawa
- Copyright (c) 2025-2026 Laurent22
- Copyright (c) 2017-2025 Dom Christie
This is originally based on @joplin/turndown-plugin-gfm (commit: 0538bf0) by Laurent Cozic, which is a fork of turndown-plugin-gfm by Dom Christie. All of them are licensed under the MIT License.
