iansinnott / iansinnott/react-string-replace

Multiple matches on same string

未关闭
#35 2 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
666
派生
54
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。