mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-01 01:30:46 +08:00
Underline markdown links that have emojis
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
BIN
Binary file not shown.
@@ -160,6 +160,11 @@ test("relative image not able to being loaded", async ({ page }) => {
|
||||
await expect(page).toHaveScreenshot({ fullPage: true });
|
||||
});
|
||||
|
||||
test("underline links that contain emojis", async ({ page }) => {
|
||||
await page.goto(`${markdownUrl}/tree/main/link-files.md`);
|
||||
await expect(page).toHaveScreenshot({ fullPage: true });
|
||||
});
|
||||
|
||||
test("markdown in issues is not overflowing", async ({ page }) => {
|
||||
await page.goto(`${markdownUrl}/issues`, {
|
||||
waitUntil: "networkidle",
|
||||
|
||||
Reference in New Issue
Block a user