mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-10-02 08:50:11 +02:00
parent
1c549e2844
commit
2d700b13f6
@ -12,7 +12,7 @@ export function getFileExtension(path) {
|
||||
}
|
||||
|
||||
export function middleTruncate(str, n) {
|
||||
const fileExtensionPattern = /(\..+)$/;
|
||||
const fileExtensionPattern = /([^.]*)$/;
|
||||
const extensionMatch = str.match(fileExtensionPattern);
|
||||
|
||||
if (str.length <= n) return str;
|
||||
|
Loading…
Reference in New Issue
Block a user