Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions front-end/components/bloom.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const createBloom = (template, bloom) => {
function _formatHashtags(text) {
if (!text) return text;
return text.replace(
/\B#[^#]+/g,
/\B#\w+/g,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work for fixing this bug! The solution is precise, well-reasoned, and demonstrates solid understanding of regex patterns and how hashtags should behave.

// /\B#[^#]+/g,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually we don't leave comments like this in the code (this is why git is there - to track changes)

(match) => `<a href="/hashtag/${match.slice(1)}">${match}</a>`
);
}
Expand Down Expand Up @@ -84,4 +85,4 @@ function _formatTimestamp(timestamp) {
}
}

export {createBloom};
export { createBloom };