From 167370fcb79ca2735f6027c44d7e3b003585e43e Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Wed, 4 Aug 2021 20:52:55 +0200 Subject: [PATCH] Do not start ImageHandle for images with [data-anki] --- ts/editor/WithImageConstrained.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/editor/WithImageConstrained.svelte b/ts/editor/WithImageConstrained.svelte index ab48e6fe5..038c4712a 100644 --- a/ts/editor/WithImageConstrained.svelte +++ b/ts/editor/WithImageConstrained.svelte @@ -70,7 +70,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html continue; } - if (node.tagName === "IMG") { + if (node.tagName === "IMG" && !(node as HTMLElement).dataset.anki) { result.push(node as HTMLImageElement); } else { result.push(...filterImages(node.children));