1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

HtmlToMd: Added more test cases and fixed some issues

This commit is contained in:
Laurent Cozic
2018-05-14 19:48:52 +01:00
parent ba9598682c
commit ba2874173d
8 changed files with 79 additions and 24 deletions

View File

@@ -15,7 +15,6 @@ const md5 = require('md5');
//const Promise = require('promise');
const fs = require('fs-extra');
const stringToStream = require('string-to-stream')
function dateToTimestamp(s, zeroIfInvalid = false) {
let m = moment(s, 'YYYYMMDDTHHmmssZ');
@@ -219,8 +218,7 @@ function importEnex(parentFolderId, filePath, importOptions = null) {
while (notes.length) {
let note = notes.shift();
const contentStream = stringToStream(note.bodyXml);
const body = await enexXmlToMd(contentStream, note.resources);
const body = await enexXmlToMd(note.bodyXml, note.resources);
delete note.bodyXml;
// console.info('*************************************************************************');