dialogs icon indicating copy to clipboard operation
dialogs copied to clipboard

regex is replacing only first \n occurence

Open danielovadia opened this issue 5 years ago • 1 comments

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>')

danielovadia avatar Aug 11 '20 10:08 danielovadia

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

gillib avatar Aug 13 '20 00:08 gillib