diff --git a/packages/app-cli/tests/enex_to_md/linked_notes.enex b/packages/app-cli/tests/enex_to_md/linked_notes.enex
index 71713f666..a087928a3 100644
--- a/packages/app-cli/tests/enex_to_md/linked_notes.enex
+++ b/packages/app-cli/tests/enex_to_md/linked_notes.enex
@@ -7,9 +7,10 @@
20231224T151443Z
- ]]>
+ ]]>
+
Note 2
20160730T111759Z
@@ -19,15 +20,37 @@
Testing
]]>
+
Note 3
20160730T111759Z
20160730T111807Z
- ]]>
+ ]]>
+
+
+ Note 4
+ 20160730T111759Z
+ 20160730T111807Z
+
+
+ ]]>
+
+
+
+
+ Note 5
+ 20160730T111759Z
+ 20160730T111807Z
+
+
+ ]]>
+
+
+
Ambiguous note
20160730T111759Z
@@ -37,6 +60,7 @@
Testing
]]>
+
Ambiguous note
20160730T111759Z
diff --git a/packages/lib/import-enex-md-gen.test.ts b/packages/lib/import-enex-md-gen.test.ts
index ac5663500..f2ff886ff 100644
--- a/packages/lib/import-enex-md-gen.test.ts
+++ b/packages/lib/import-enex-md-gen.test.ts
@@ -227,10 +227,12 @@ describe('import-enex-md-gen', () => {
const note1 = notes.find(n => n.title === 'Note 1');
const note2 = notes.find(n => n.title === 'Note 2');
const note3 = notes.find(n => n.title === 'Note 3');
+ const note4 = notes.find(n => n.title === 'Note 4');
- expect(notes.length).toBe(5);
+ expect(notes.length).toBe(7);
expect(note1.body).toBe(`[Note 2](:/${note2.id})[Note 3](:/${note3.id})`);
expect(note3.body).toBe('[Ambiguous note](evernote:///view/5223870/s49/9cd5e810-fa03-429a-8194-ab847f2f1ab2/c99d9e01-ca35-4c75-ba63-f0c0ef97787d/)');
+ expect(note4.body).toBe('[Note 5](https://joplinapp.org)');
});
});
diff --git a/packages/lib/import-enex.ts b/packages/lib/import-enex.ts
index 4866b0fde..1b1623658 100644
--- a/packages/lib/import-enex.ts
+++ b/packages/lib/import-enex.ts
@@ -293,6 +293,9 @@ const preProcessFile = async (filePath: string): Promise => {
// return newFilePath;
};
+const isEvernoteUrl = (url: string) => {
+ return url.toLowerCase().startsWith('evernote://');
+};
const restoreNoteLinks = async (notes: SavedNote[], noteTitlesToIds: Record, importOptions: ImportOptions) => {
// --------------------------------------------------------
@@ -309,6 +312,8 @@ const restoreNoteLinks = async (notes: SavedNote[], noteTitlesToIds: Record