From 5ab1a93aa385a8196a2ba59f42870beb7b7577b5 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 26 Nov 2025 18:58:24 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/pull/16449 --- app/src/protyle/wysiwyg/transaction.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 7072d1745..d8d2c541f 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -606,14 +606,16 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo: } Object.keys(data.old).forEach(key => { item.removeAttribute(key); + if (key === "custom-avs") { + item.removeAttribute("av-names"); + } }); if (data.new.style && data.new[Constants.CUSTOM_RIFF_DECKS] && data.new[Constants.CUSTOM_RIFF_DECKS] !== data.old[Constants.CUSTOM_RIFF_DECKS]) { data.new.style += ";animation:addCard 450ms linear"; } Object.keys(data.new).forEach(key => { - if ("id" === key || "av-names" === key) { + if ("id" === key) { // 设置属性以后不应该给块元素添加 id 属性 No longer add the `id` attribute to block elements after setting the attribute https://github.com/siyuan-note/siyuan/issues/15327 - // av-names 属性仅用于生成角标,不添加到元素 return; }