use GFM extensions for markdown export, closes #638

This commit is contained in:
zadam
2019-09-30 20:56:32 +02:00
parent ed24e32305
commit f6fc24d11d
5 changed files with 31 additions and 9 deletions

View File

@@ -1,9 +1,9 @@
"use strict";
const TurndownService = require('turndown');
const mimeTypes = require('mime-types');
const html = require('html');
const utils = require('../utils');
const mdService = require('./md');
async function exportSingleNote(exportContext, branch, format, res) {
const note = await branch.getNote();
@@ -31,8 +31,7 @@ async function exportSingleNote(exportContext, branch, format, res) {
mime = 'text/html';
}
else if (format === 'markdown') {
const turndownService = new TurndownService();
payload = turndownService.turndown(content);
payload = mdService.toMarkdown(content);
extension = 'md';
mime = 'text/x-markdown'
}