Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not support table convert #416

Open
thanksqq opened this issue Aug 4, 2022 · 6 comments
Open

Do not support table convert #416

thanksqq opened this issue Aug 4, 2022 · 6 comments

Comments

@thanksqq
Copy link

thanksqq commented Aug 4, 2022

The tool cannot convert table, remove all table marks.
We should convert table to this format:

aaa bbb ccc
1 2 3
4 5 6
7 8 9
@phy25
Copy link

phy25 commented Dec 4, 2022

GitHub Flavoured Markdown extension supports it: https://github.com/domchristie/turndown-plugin-gfm.

@CALLMELARE
Copy link

You can solve this problem by plugin turndown-plugin-gfm. The usage method is as follows:

import TurndownService from 'turndown';
import { gfm } from 'turndown-plugin-gfm';

const td = new TurndownService();
td.use(gfm);

@RobertoPegoraro
Copy link

turndown-plugin-gfm is outdated, the last version is from 2017 and it doesn't work now a days. I need another solution

@adamalfredsson
Copy link

turndown-plugin-gfm is outdated, the last version is from 2017 and it doesn't work now a days. I need another solution

Did you find any other solution?

@RobertoPegoraro
Copy link

RobertoPegoraro commented Aug 31, 2023

turndown-plugin-gfm is outdated, the last version is from 2017 and it doesn't work now a days. I need another solution

Did you find any other solution?

Yeap using: joplin-turndown-plugin-gfm

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

var gfm = turndownPluginGfm.gfm
var turndownService = new TurndownService()
turndownService.use(gfm)
var markdown = turndownService.turndown(html)
console.log(markdown)

@shaipetel
Copy link

Yes! that new gfm plugin is working. Need to update docs - but thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants