4 Commits

Author SHA1 Message Date
945b0ae8b8 2.0.3 2020-01-18 16:43:45 +00:00
ba90bb50a2 fix(core): update 2020-01-18 16:43:45 +00:00
72de4bfb7d 2.0.2 2019-06-17 14:41:57 +02:00
d195535ca0 fix(core): update 2019-06-17 14:41:57 +02:00
4 changed files with 497 additions and 406 deletions

878
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartmarkdown", "name": "@pushrocks/smartmarkdown",
"version": "2.0.1", "version": "2.0.3",
"private": false, "private": false,
"description": "do more with markdown files", "description": "do more with markdown files",
"main": "dist/index.js", "main": "dist/index.js",
@ -12,19 +12,20 @@
"build": "tsbuild --web" "build": "tsbuild --web"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.11", "@gitzone/tsbuild": "^2.1.17",
"@gitzone/tsrun": "^1.2.6", "@gitzone/tsrun": "^1.2.8",
"@gitzone/tstest": "^1.0.24", "@gitzone/tstest": "^1.0.28",
"@pushrocks/tapbundle": "^3.0.9", "@pushrocks/tapbundle": "^3.2.0",
"@types/node": "^12.0.8", "@types/node": "^13.1.8",
"tslint": "^5.17.0", "tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@types/marked": "^0.6.5", "@types/marked": "^0.7.2",
"@types/turndown": "^5.0.0", "@types/turndown": "^5.0.0",
"marked": "^0.6.2", "marked": "^0.8.0",
"turndown": "^5.0.3" "turndown": "^5.0.3",
"turndown-plugin-gfm": "^1.0.2"
}, },
"files": [ "files": [
"ts/*", "ts/*",

View File

@ -16,6 +16,7 @@ export class SmartMarkdown {
headingStyle: 'atx', headingStyle: 'atx',
codeBlockStyle: 'fenced' codeBlockStyle: 'fenced'
}); });
turndownInstance.use(plugins.turndownPluginGfm.gfm);
return turndownInstance.turndown(htmlString); return turndownInstance.turndown(htmlString);
} }
} }

View File

@ -1,4 +1,5 @@
import marked = require('marked'); import marked = require('marked');
import turndown from 'turndown'; import turndown from 'turndown';
import * as turndownPluginGfm from 'turndown-plugin-gfm';
export { marked, turndown }; export { marked, turndown, turndownPluginGfm };