From c3933e996ff0225d026fbff0be1dee94270bbd32 Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Sat, 6 Apr 2024 08:13:47 +0200 Subject: [PATCH] Fix for #86 Use fetch() to get app://... assets --- src/note.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/note.ts b/src/note.ts index 304b8d9..de1f9bf 100644 --- a/src/note.ts +++ b/src/note.ts @@ -335,13 +335,7 @@ export default class Note { if (!src) continue let content let filepath = '' - if (src.startsWith('app://')) { - const srcMatch = src.match(/app:\/\/\w+\/([^?#]+)/) - if (srcMatch) { - filepath = window.decodeURIComponent(srcMatch[1]) - content = await FileSystemAdapter.readLocalFile(filepath) - } - } else if (src.match(/^https?:\/\/localhost/) || !src.startsWith('http')) { + if (src.match(/^https?:\/\/localhost/) || !src.startsWith('http')) { filepath = src try { const res = await fetch(filepath)