Skip to content

Commit 35f420a

Browse files
committed
🔖 v1.2.3
1 parent 7e95b52 commit 35f420a

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v1.2.3 / 2024.12.02
2+
3+
- 🐛 fix 命令【取消脚注编号】对index内容的重命名错误
4+
15
## v1.2.2 / 2024.12.02
26

37
- ✨ 脚注容器标题可以支持设置为段落块,不需要一定是标题了!

plugin.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "siyuan-plugin-blockref-footnote",
33
"author": "Achuan-2",
44
"url": "https://github.com/Achuan-2/siyuan-plugin-blockref-footnote",
5-
"version": "1.2.2",
5+
"version": "1.2.3",
66
"minAppVersion": "3.1.13",
77
"backends": [
88
"windows",

src/index.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@ export default class PluginFootnote extends Plugin {
412412
},
413413
editorCallback: async (protyle: any) => {
414414
if (protyle.block?.rootID) {
415-
await this.reorderFootnotes(protyle.block.rootID, true);
416415
await pushMsg(this.i18n.cancelReorderFootnotes + " ...");
416+
await this.reorderFootnotes(protyle.block.rootID, true);
417417
await pushMsg(this.i18n.cancelReorderFootnotes + " Finished");
418418
}
419419
},
@@ -1316,12 +1316,13 @@ export default class PluginFootnote extends Plugin {
13161316
Array.from(footnoteIds).map(async footnoteId => {
13171317
let footnoteBlock = (await getBlockDOM(footnoteId)).dom;
13181318
if (footnoteBlock) {
1319-
footnoteBlock = footnoteBlock.replace(/(<span data-type=".*?custom-footnote-index[^>]*>)\[\d+\](<\/span>)/g, `$1${this.i18n.indexAnchor}$2`);
1319+
footnoteBlock = footnoteBlock.replace(/(<span data-type=".*?custom-footnote-index[^>]*>)[^<]*(<\/span>)/g, "$1" + this.i18n.indexAnchor + "$2");
1320+
updateBlock("dom", footnoteBlock, footnoteId);
13201321
}
1321-
updateBlock("dom", footnoteBlock, footnoteId);
13221322
// return setBlockAttrs(footnoteId, { "name": "" });
13231323
})
13241324
);
1325+
13251326
}
13261327

13271328
}

0 commit comments

Comments
 (0)