Skip to content

Conversation

@sheetalkharab
Copy link

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@sheetalkharab sheetalkharab added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Sep 29, 2025
Copy link

@mjpeet mjpeet left a comment

Choose a reason for hiding this comment

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

well done:

  1. Both blooms now generate the correct hashtag URL: /hashtag/SwizBiz
  2. The frontend hashtag parsing matches the backend's hashtag storage logic
  3. All hashtag links will work correctly regardless of punctuation or position in the text
  4. Proper URL encoding prevents any special character issues

.



def add_bloom(*, sender: User, content: str) -> Bloom:
if len(content) > 280:
Copy link

Choose a reason for hiding this comment

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

well done limiting content length in front end as well


function _formatHashtags(text) {
if (!text) return text;
// special character in hashtag convert into url friendly format
Copy link

Choose a reason for hiding this comment

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

good comment

return text.replace(
/\B#[^#]+/g,
(match) => `<a href="/hashtag/${match.slice(1)}">${match}</a>`
/\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.

good catch:

  1. /\B#(\w+)/g - Only captures word characters (letters, digits, underscore)
  2. Uses capturing group to extract just the tag name
  3. encodeURIComponent(tag) - Properly encodes for URLs

@mjpeet mjpeet added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants