Skip to content

Commit

Permalink
fix: patch middle truncation func (#465)
Browse files Browse the repository at this point in the history
resolves #456
  • Loading branch information
timothycarambat authored Dec 18, 2023
1 parent 1c549e2 commit 2d700b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/utils/directories.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2d700b1

Please sign in to comment.