bvaughn / bvaughn/react-highlight-words

textToHighlight Prop doesn't maintain the spacing or newlines

Open
#80 2 comments 4 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
2.3k
Forks
175
PR merge metrics
No merged PRs in 30d

Description

The text I'm passing to the textToHighlight prop contains newlines because it is formatted in paragraphs. Unfortunately, the spacing or newlines are not maintained so my text doesn't look formatted anymore.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with textToHighlight containing paragraph newlines, then inspect the component's text-rendering path. Done means spacing and newlines remain visible in the rendered highlighted text, with a regression test covering formatted input.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.