diff --git a/package-lock.json b/package-lock.json index a8ff0a42d..0fbf49f54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2303,6 +2303,11 @@ "jsdom": "^16.2.0" } }, + "turndown-plugin-gfm": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/turndown-plugin-gfm/-/turndown-plugin-gfm-1.0.2.tgz", + "integrity": "sha512-vwz9tfvF7XN/jE0dGoBei3FXWuvll78ohzCZQuOb+ZjWrs3a0XhQVomJEb2Qh4VHTPNRO4GPZh0V7VRbiWwkRg==" + }, "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", diff --git a/package.json b/package.json index 64f728466..87d56ea86 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/src/filter/index.js b/src/filter/index.js index 3f251dccd..6ab0d27cb 100644 --- a/src/filter/index.js +++ b/src/filter/index.js @@ -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) {