iansinnott / iansinnott/react-string-replace

Multiple matches on same string

オープン
#35 コメント 2 件 リアクション 6 件 担当者 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 を短くまとめたダイジェスト。