Skip to content

Commit

Permalink
feat: 删除圆括号的引用角标,如: (1), (2, 3), (4-7)
Browse files Browse the repository at this point in the history
  • Loading branch information
laorange committed Apr 19, 2023
1 parent 55946cb commit ff61117
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/assets/ts/article-copy-tool/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,16 @@ export const textHandlers: TextHandlers = {
},
},

deleteReferenceBadge:{
description: "删除引用角标 (如: <sup>[1]</sup>, <sup>[2, 3]</sup>, <sup>[4-7]</sup>)",
deleteReferenceCurveBadge: {
description: "删除引用角标,如: (1), (2, 3), (4-7)",
activate: false,
executor: text => text.replaceAll(/\([\d,\-\s]+\)/g, ""),
},

deleteReferenceBadge: {
description: "删除引用角标,如: [1], [2, 3], [4-7]",
activate: true,
executor: text => text.replaceAll(/\[[\d,\-\s]+]/g, "")
executor: text => text.replaceAll(/\[[\d,\-\s]+]/g, ""),
},

/** 全角转半角, 参考:
Expand Down

0 comments on commit ff61117

Please sign in to comment.