Underline markdown links that have emojis

This commit is contained in:
Sebastian Martinez
2024-04-04 13:37:37 +02:00
parent 127efc49a5
commit 187a67e03e
3 changed files with 10 additions and 1 deletions
+5 -1
View File
@@ -111,7 +111,11 @@
console.warn("Not able to parse url", e);
}
// Don't underline <a> tags that contain images.
if (e.firstElementChild instanceof HTMLImageElement) {
// Make an exception for emojis.
if (
e.firstElementChild instanceof HTMLImageElement &&
!e.firstElementChild.classList.contains("txt-emoji")
) {
e.classList.add("no-underline");
}
}