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
2 changes: 1 addition & 1 deletion front-end/components/bloom.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const createBloom = (template, bloom) => {
function _formatHashtags(text) {
if (!text) return text;
return text.replace(
/\B#[^#]+/g,
/\B#[a-zA-Z0-9_]+/g,

Choose a reason for hiding this comment

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

This will work, but if you check the standard regular expression terms, can you see an easier way?

(match) => `<a href="/hashtag/${match.slice(1)}">${match}</a>`
);
}
Expand Down