Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Underline markdown links that have emojis
Sebastian Martinez committed 2 years ago
commit 187a67e03e2a2817c464d07e2761b56e216e7af7
parent 127efc49a56eca7fedec41242c1d35cb9de4a201
3 files changed +10 -1
modified src/components/Markdown.svelte
@@ -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");
      }
    }
modified tests/fixtures/repos/markdown.tar.bz2
modified tests/visual/desktop/markdown.spec.ts
@@ -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",