Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regex is replacing only first \n occurence #56

Open
danielovadia opened this issue Aug 11, 2020 · 1 comment
Open

regex is replacing only first \n occurence #56

danielovadia opened this issue Aug 11, 2020 · 1 comment

Comments

@danielovadia
Copy link

In line 50 on index.js, there's a regex replacement from\nto <br>
The issue is that the regex is not using the g modifier - which causing only the first \n occurrence to be replaced.
to fix that, there's a need to change
_html: (title || '').replace(/<[^>]+>/g).replace(/\n/, '<br>')
to
_html: (title || '').replace(/<[^>]+>/g).replace(/\n/g, '<br>')

@gillib
Copy link

gillib commented Aug 13, 2020

This is also important for me. If anyone can solve this... Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants