From 41c0f9fb65de51062dfd3cceded8636dbaa5a0bb Mon Sep 17 00:00:00 2001 From: YanCore <45490808+YanCore@users.noreply.github.com> Date: Sat, 7 Jun 2025 09:38:43 +0800 Subject: [PATCH] fix: fix link func display --- src/pages/GenerateColumns.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/GenerateColumns.tsx b/src/pages/GenerateColumns.tsx index 9ea2acd..a07d9f9 100644 --- a/src/pages/GenerateColumns.tsx +++ b/src/pages/GenerateColumns.tsx @@ -26,8 +26,8 @@ export function formatValue( function formatObject(value: any) { const type = value.type; if (type === 'file') { - const fileName = value.path.split('/').pop().replace(/\.md$/, '') - return {type: "link", path: value.path, display: fileName}; + const display = value.display !== undefined ? value.display : value.path.split('/').pop().replace(/\.md$/, ''); + return {type: "link", path: value.path, display: display}; } if ("path" in value && "display" in value) {