mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
use GFM extensions for markdown export, closes #638
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user