diff --git a/front-end/components/bloom.mjs b/front-end/components/bloom.mjs index 0b4166c..166ab84 100644 --- a/front-end/components/bloom.mjs +++ b/front-end/components/bloom.mjs @@ -36,9 +36,14 @@ const createBloom = (template, bloom) => { function _formatHashtags(text) { if (!text) return text; - return text.replace( - /\B#[^#]+/g, - (match) => `${match}` + + // Normalize newlines and tabs to spaces + const normalizedText = text.replace(/[\r\n\t]+/g, " "); + + return normalizedText.replace( + // Updated regex to correctly handle multiple hashtags with letters, numbers, and underscores + /#([a-zA-Z0-9_]+)/g, + (match) => `${match}`, ); }