# @guyplusplus/turndown-plugin-gfm

> Turndown plugin to add GitHub Flavored Markdown extensions.

Latest version **1.0.7** (published 2021-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @guyplusplus/turndown-plugin-gfm
pnpm add @guyplusplus/turndown-plugin-gfm
yarn add @guyplusplus/turndown-plugin-gfm
bun add @guyplusplus/turndown-plugin-gfm
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2021-07-03 |
| First published | 2021-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 28 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Dom Christie |
| Maintainers | guyplusplus |
| Keywords | turndown, turndown-plugin, html-to-markdown, html, markdown, github-flavored-markdown, gfm |

## Links

- npm: https://www.npmjs.com/package/@guyplusplus/turndown-plugin-gfm
- Repository: https://github.com/guyplusplus/turndown-plugin-gfm
- Homepage: https://github.com/guyplusplus/turndown-plugin-gfm#readme
- Issues: https://github.com/guyplusplus/turndown-plugin-gfm/issues
- npm.io page: https://npm.io/package/@guyplusplus/turndown-plugin-gfm

## Dependencies (1)

- [turndown](https://npm.io/package/turndown.md) ^7.1.1

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.7 (latest) — 2021-07-03
- 1.0.6 — 2021-06-22
- 1.0.5 — 2021-06-21

## README

# turndown-plugin-gfm

A [Turndown](https://github.com/domchristie/turndown) plugin which adds GitHub Flavored Markdown extensions.

## Test Page

The test page can be found [here](https://guyplusplus.github.io/turndown-plugin-gfm/).

## Fork information

This is a fork of the original [turndown-plugin-gfm](https://github.com/domchristie/turndown-plugin-gfm) for general purpose. It is pending on this [pull request](https://github.com/domchristie/turndown-plugin-gfm/pull/31).

The changes are:
- migrated to node v5
- upgraded inclusion of turndown npm package to 7.0.0
- support tables with `caption` and `colgroup` elements
- support conversion of a multi-lines cell to a single line cell
- pipe character `|` are properly escaped in a table cell
- fix support for tables with no row
- support for `colspan`
- nested table inside a table render as is, gfm is not applied
- added more test cases accordingly

TODO:
- [ ] rowspan support
- [ ] support for relaxed and strict gfm (not html) rendering. So new lines, nested tables would render differently

## Installation

npm:

```
npm install @guyplusplus/turndown-plugin-gfm
```

Browser:

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

## Usage

```js
// For Node.js
var TurndownService = require('turndown')
var TurndownPluginGfm = require('@guyplusplus/turndown-plugin-gfm')

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

```js
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.

---
_Source: https://npm.io/package/@guyplusplus/turndown-plugin-gfm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
