feat: markdown export (#233)

This commit is contained in:
lencx
2023-02-03 12:22:15 +08:00
parent 4847bb6fac
commit 70aac07f8e
3 changed files with 22 additions and 2 deletions

View File

@@ -2,7 +2,9 @@ var ExportMD = (function () {
if (!TurndownService || !turndownPluginGfm) return;
const hljsREG = /^.*(hljs).*(language-[a-z0-9]+).*$/i;
const gfm = turndownPluginGfm.gfm
const turndownService = new TurndownService()
const turndownService = new TurndownService({
hr: '---'
})
.use(gfm)
.addRule('code', {
filter: (node) => {