support OPML from MindManager, fixes #1862

This commit is contained in:
zadam 2021-04-19 22:33:58 +02:00
parent 583df35231
commit a88a32acae
2 changed files with 7 additions and 1 deletions

View File

@ -22,7 +22,7 @@ app.on('window-all-closed', () => {
}); });
app.on('ready', async () => { 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 not initialized -> setup process
// if db is initialized, then we need to wait until the migration process is finished // if db is initialized, then we need to wait until the migration process is finished

View File

@ -36,6 +36,12 @@ async function importOpml(taskContext, fileBuffer, parentNote) {
if (opmlVersion === 1) { if (opmlVersion === 1) {
title = outline.$.title; title = outline.$.title;
content = toHtml(outline.$.text); content = toHtml(outline.$.text);
if (!title || !title.trim()) {
// https://github.com/zadam/trilium/issues/1862
title = outline.$.text;
content = '';
}
} }
else if (opmlVersion === 2) { else if (opmlVersion === 2) {
title = outline.$.text; title = outline.$.text;