We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
applyToLink
1 parent 8c968cc commit 1ae0edfCopy full SHA for 1ae0edf
index.js
@@ -187,7 +187,7 @@ function applyToLink(a, currentUrl) {
187
// Shorten only if the link name hasn't been customized.
188
// .href automatically adds a / to naked origins so that needs to be tested too
189
// `trim` makes it compatible with this feature: https://github.com/sindresorhus/refined-github/pull/3085
190
- if (a.href === a.textContent.trim() || a.href === `${a.textContent}/`) {
+ if ((a.href === a.textContent.trim() || a.href === `${a.textContent}/`) && !a.firstElementChild) {
191
const shortened = shortenURL(a.href, currentUrl);
192
a.innerHTML = shortened;
193
return true;
0 commit comments