hololake-system-architecture/product-source/guanghu-knowledge-base/src/presentation.ts

6 lines
286 B
TypeScript

const IMPORT_COLLISION_SUFFIX = /\s+[0-9a-f]{24,64}(?=\.md$|$)/iu;
/** 只清理导入器为避免重名附加的散列;不改动真实文档标题和文件。 */
export function cleanDisplayText(value: string): string {
return value.replace(IMPORT_COLLISION_SUFFIX, '').trim();
}