]> Untitled Git - lemmy-ui.git/commitdiff
Add community link class
authorZetaphor <zetaphor@hey.com>
Thu, 22 Jun 2023 04:07:33 +0000 (01:07 -0300)
committerZetaphor <zetaphor@hey.com>
Thu, 22 Jun 2023 04:07:33 +0000 (01:07 -0300)
src/shared/markdown.ts

index c837dba64eb361bbda5b4eb56f222c48653a1ab1..6e6b504f0d37e22d1c4a9a439af77e8475b1ed8e 100644 (file)
@@ -111,7 +111,10 @@ function localCommunityLinkParser(md) {
             beforeToken.content = beforeContent;
 
             const linkOpenToken = new state.Token("link_open", "a", 1);
-            linkOpenToken.attrs = [["href", url]];
+            linkOpenToken.attrs = [
+              ["href", url],
+              ["class", "community-link"],
+            ];
 
             const textToken = new state.Token("text", "", 0);
             textToken.content = match;