iansinnott / iansinnott/react-string-replace

Multiple matches on same string

Open
#35 2 comments 6 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
666
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Hi there, when using this twice on the same string what is happens is as follows, the first string matches and an array containing the react component returned from the callback fucktion is returned, and than in the second replace, it skips the symbol that was returned from the first run because it is not a string...
I think the solution would be to use flattenDeep instead of flatten, and clarify that callback functions should return an array instead of a component.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.