From 6bf9f0429d8a00b411136810f9a7b84830936ea0 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 20 Apr 2025 16:45:45 +0800 Subject: [PATCH] :art: Use natural ascending order when inserting multiple assets https://github.com/siyuan-note/siyuan/issues/14643 --- app/src/protyle/upload/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/protyle/upload/index.ts b/app/src/protyle/upload/index.ts index 366e97047..e882fddeb 100644 --- a/app/src/protyle/upload/index.ts +++ b/app/src/protyle/upload/index.ts @@ -121,6 +121,8 @@ const genUploadedLabel = (responseText: string, protyle: IProtyle) => { } let successFileText = ""; const keys = Object.keys(response.data.succMap); + // 插入多个资源文件时按文件名自然升序排列 Use natural ascending order when inserting multiple assets https://github.com/siyuan-note/siyuan/issues/14643 + keys.sort((a, b) => a.localeCompare(b, undefined, { numeric: true })); const avAssets: IAVCellAssetValue[] = []; let hasImage = false; keys.forEach((key, index) => {