Skip to content

Commit

Permalink
Add Github Flavoured Markdown extension to filter
Browse files Browse the repository at this point in the history
Convert HTML tables and strikethrough
  • Loading branch information
MattiSG authored and Ndpnt committed Jul 29, 2020
1 parent f979f58 commit 21d579a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"node-schedule": "^1.3.2",
"sib-api-v3-sdk": "^7.2.3",
"simple-git": "^2.6.0",
"turndown": "^6.0.0"
"turndown": "^6.0.0",
"turndown-plugin-gfm": "^1.0.2"
}
}
2 changes: 2 additions & 0 deletions src/filter/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import TurndownService from 'turndown';
import turndownPluginGithubFlavouredMarkdown from 'turndown-plugin-gfm';
import jsdom from 'jsdom';

const { JSDOM } = jsdom;
const turndownService = new TurndownService();
turndownService.use(turndownPluginGithubFlavouredMarkdown.gfm);


export default async function filter(content, selector, filterNames, filterFunctions) {
Expand Down

0 comments on commit 21d579a

Please sign in to comment.