fix: use basename of directory paths for icon filename (#201)

This commit is contained in:
uncenter 2025-04-30 13:20:38 -04:00 committed by GitHub
parent e32bc50d97
commit 1fd9c213e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,7 +118,7 @@ export async function replaceIconInRow(
if (!fileNameEl) return;
const fileName = fileNameEl.textContent
?.split('/')
.at(0)
.at(-1)
.trim()
/* Remove [Unicode LEFT-TO-RIGHT MARK](https://en.wikipedia.org/wiki/Left-to-right_mark) used on GitLab's merge request diff file tree. */
.replace(/\u200E/g, '');