From b24224f7c4e8be22a7fa8633c025d5bc9deb8f61 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 31 May 2023 09:37:09 +0800 Subject: [PATCH] :bug: https://github.com/siyuan-note/siyuan/issues/5066 addIcons --- app/src/plugin/index.ts | 2 +- app/src/util/assets.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/plugin/index.ts b/app/src/plugin/index.ts index cb63521b2..c3621657f 100644 --- a/app/src/plugin/index.ts +++ b/app/src/plugin/index.ts @@ -61,7 +61,7 @@ export class Plugin { } public addIcons(svg: string) { - document.body.insertAdjacentHTML("afterbegin", ` + document.body.insertAdjacentHTML("afterbegin", ` ${svg}`); } diff --git a/app/src/util/assets.ts b/app/src/util/assets.ts index d0160db15..33aee6333 100644 --- a/app/src/util/assets.ts +++ b/app/src/util/assets.ts @@ -105,7 +105,7 @@ export const loadAssets = (data: IAppearance) => { while (svgElement.tagName === "svg") { const currentSvgElement = svgElement; svgElement = svgElement.nextElementSibling; - if (currentSvgElement.id !== "emojiScriptSvg") { + if (currentSvgElement.id !== "emojiScriptSvg" && !currentSvgElement.getAttribute("data-name")) { currentSvgElement.remove(); } }