From adaa8a8483c382b761f36a7d0d3758313dc21243 Mon Sep 17 00:00:00 2001 From: Sara Tahir Date: Wed, 4 Feb 2026 19:39:27 +0000 Subject: [PATCH 1/2] Fix hashtag formatting bug where extra words were included in the link --- front-end/components/bloom.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/front-end/components/bloom.mjs b/front-end/components/bloom.mjs index 0b4166c..bcffb41 100644 --- a/front-end/components/bloom.mjs +++ b/front-end/components/bloom.mjs @@ -36,12 +36,14 @@ const createBloom = (template, bloom) => { function _formatHashtags(text) { if (!text) return text; + return text.replace( - /\B#[^#]+/g, + /\B#[a-zA-Z0-9_]+/g, (match) => `${match}` ); } + function _formatTimestamp(timestamp) { if (!timestamp) return ""; From 38d0178be643bc5c7e0c3dcb2d158712af037502 Mon Sep 17 00:00:00 2001 From: Sara Tahir Date: Tue, 10 Feb 2026 21:07:32 +0000 Subject: [PATCH 2/2] simplifies the regex- pot review --- front-end/components/bloom.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front-end/components/bloom.mjs b/front-end/components/bloom.mjs index bcffb41..d576bc3 100644 --- a/front-end/components/bloom.mjs +++ b/front-end/components/bloom.mjs @@ -38,7 +38,7 @@ function _formatHashtags(text) { if (!text) return text; return text.replace( - /\B#[a-zA-Z0-9_]+/g, + /\B#\w+/g, (match) => `${match}` ); }