diff --git a/package-lock.json b/package-lock.json index a8ff0a42d..5838a96a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1201,6 +1201,11 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, + "joplin-turndown-plugin-gfm": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/joplin-turndown-plugin-gfm/-/joplin-turndown-plugin-gfm-1.0.12.tgz", + "integrity": "sha512-qL4+1iycQjZ1fs8zk3jSRk7cg3ROBUHk7GKtiLAQLFzLPKErnILUvz5DLszSQvz3s1sTjPbywLDISVUtBY6HaA==" + }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", diff --git a/package.json b/package.json index 64f728466..a92b0eb94 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "dotenv": "^8.2.0", "http-proxy-agent": "^4.0.1", "https-proxy-agent": "^5.0.0", + "joplin-turndown-plugin-gfm": "^1.0.12", "jsdom": "^16.2.2", "node-fetch": "^2.6.0", "node-schedule": "^1.3.2", diff --git a/src/filter/index.js b/src/filter/index.js index 3f251dccd..04e50d935 100644 --- a/src/filter/index.js +++ b/src/filter/index.js @@ -1,8 +1,10 @@ import TurndownService from 'turndown'; +import turndownPluginGithubFlavouredMarkdown from 'joplin-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) {