From b75675212fc904c1b1fed798ac69843fe1512073 Mon Sep 17 00:00:00 2001 From: Xylight Date: Sat, 27 Jul 2024 10:24:40 -0700 Subject: [PATCH] fix: update user and community regex --- src/lib/components/markdown/markdown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/markdown/markdown.ts b/src/lib/components/markdown/markdown.ts index 3c5401d9..da3b9fb2 100644 --- a/src/lib/components/markdown/markdown.ts +++ b/src/lib/components/markdown/markdown.ts @@ -126,8 +126,8 @@ md.linkify.add('u/', { const regexes = { post: /^https:\/\/([a-zA-Z0-9.-]+)\/post\/(\d+)$/i, comment: /^https:\/\/([a-zA-Z0-9.-]+)\/comment\/(\d+)$/i, - user: /^https:\/\/([a-zA-Z0-9.-]+)(\/u\/)([a-zA-Z0-9.-]+)$/i, - community: /^https:\/\/([a-zA-Z0-9.-]+)(\/c\/)([a-zA-Z0-9.-]+)$/i, + user: /^https:\/\/([a-zA-Z0-9.-]+)(\/u\/)([a-zA-Z0-9.-_]+)$/i, + community: /^https:\/\/([a-zA-Z0-9.-]+)(\/c\/)([a-zA-Z0-9.-_]+)$/i, } /**