Open thanksqq opened 2 years ago
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 |
GitHub Flavoured Markdown extension supports it: https://github.com/domchristie/turndown-plugin-gfm.
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);
turndown-plugin-gfm is outdated, the last version is from 2017 and it doesn't work now a days. I need another solution
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?
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)
Yes! that new gfm plugin is working. Need to update docs - but thanks!