Skip to content
Snippets Groups Projects
Unverified Commit 2d700b13 authored by Timothy Carambat's avatar Timothy Carambat Committed by GitHub
Browse files

fix: patch middle truncation func (#465)

resolves #456
parent 1c549e28
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment