Skip to content

Commit

Permalink
🔖 v1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Dec 2, 2024
1 parent 7e95b52 commit 35f420a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.2.3 / 2024.12.02

- 🐛 fix 命令【取消脚注编号】对index内容的重命名错误

## v1.2.2 / 2024.12.02

- ✨ 脚注容器标题可以支持设置为段落块,不需要一定是标题了!
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 4 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
},
Expand Down Expand Up @@ -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 data-type=".*?custom-footnote-index[^>]*>)\[\d+\](<\/span>)/g, `$1${this.i18n.indexAnchor}$2`);
footnoteBlock = footnoteBlock.replace(/(<span data-type=".*?custom-footnote-index[^>]*>)[^<]*(<\/span>)/g, "$1" + this.i18n.indexAnchor + "$2");
updateBlock("dom", footnoteBlock, footnoteId);
}
updateBlock("dom", footnoteBlock, footnoteId);
// return setBlockAttrs(footnoteId, { "name": "" });
})
);

}

}
Expand Down

0 comments on commit 35f420a

Please sign in to comment.