diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b641d7..c77f71d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.2.3 / 2024.12.02 + +- 🐛 fix 命令【取消脚注编号】对index内容的重命名错误 + ## v1.2.2 / 2024.12.02 - ✨ 脚注容器标题可以支持设置为段落块,不需要一定是标题了! diff --git a/plugin.json b/plugin.json index 047f714..a51198a 100644 --- a/plugin.json +++ b/plugin.json @@ -2,7 +2,7 @@ "name": "siyuan-plugin-blockref-footnote", "author": "Achuan-2", "url": "https://github.com/Achuan-2/siyuan-plugin-blockref-footnote", - "version": "1.2.2", + "version": "1.2.3", "minAppVersion": "3.1.13", "backends": [ "windows", diff --git a/src/index.ts b/src/index.ts index ab5f887..00732f0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -412,8 +412,8 @@ export default class PluginFootnote extends Plugin { }, editorCallback: async (protyle: any) => { if (protyle.block?.rootID) { - await this.reorderFootnotes(protyle.block.rootID, true); await pushMsg(this.i18n.cancelReorderFootnotes + " ..."); + await this.reorderFootnotes(protyle.block.rootID, true); await pushMsg(this.i18n.cancelReorderFootnotes + " Finished"); } }, @@ -1316,12 +1316,13 @@ export default class PluginFootnote extends Plugin { Array.from(footnoteIds).map(async footnoteId => { let footnoteBlock = (await getBlockDOM(footnoteId)).dom; if (footnoteBlock) { - footnoteBlock = footnoteBlock.replace(/(]*>)[^<]*(<\/span>)/g, "$1" + this.i18n.indexAnchor + "$2"); + updateBlock("dom", footnoteBlock, footnoteId); } - updateBlock("dom", footnoteBlock, footnoteId); // return setBlockAttrs(footnoteId, { "name": "" }); }) ); + } }