mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-14 11:14:21 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
4767e399e2
5 changed files with 18 additions and 16 deletions
|
|
@ -104,6 +104,10 @@ export const objEquals = (a: any, b: any): boolean => {
|
|||
};
|
||||
|
||||
export const duplicateNameAddOne = (name:string) => {
|
||||
if (!name) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const nameMatch = name.match(/^(.*) \((\d+)\)$/);
|
||||
if (nameMatch) {
|
||||
name = `${nameMatch[1]} (${parseInt(nameMatch[2]) + 1})`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue