iansinnott / iansinnott/react-string-replace

Multiple matches on same string

Ouverte
#35 2 commentaires 6 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
666
Forks
54
Métriques de merge des PR
Aucune PR mergée en 30 j

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.