From a88a32acae48ef5ba7ded202efcbd877afb65548 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 19 Apr 2021 22:33:58 +0200 Subject: [PATCH] support OPML from MindManager, fixes #1862 --- electron.js | 2 +- src/services/import/opml.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/electron.js b/electron.js index a476c0de0..408269cf7 100644 --- a/electron.js +++ b/electron.js @@ -22,7 +22,7 @@ app.on('window-all-closed', () => { }); app.on('ready', async () => { - app.setAppUserModelId('com.github.zadam.trilium'); +// app.setAppUserModelId('com.github.zadam.trilium'); // if db is not initialized -> setup process // if db is initialized, then we need to wait until the migration process is finished diff --git a/src/services/import/opml.js b/src/services/import/opml.js index df1150fd2..133a7088b 100644 --- a/src/services/import/opml.js +++ b/src/services/import/opml.js @@ -36,6 +36,12 @@ async function importOpml(taskContext, fileBuffer, parentNote) { if (opmlVersion === 1) { title = outline.$.title; content = toHtml(outline.$.text); + + if (!title || !title.trim()) { + // https://github.com/zadam/trilium/issues/1862 + title = outline.$.text; + content = ''; + } } else if (opmlVersion === 2) { title = outline.$.text;