iansinnott / iansinnott/react-string-replace
Multiple matches on same string
未關閉
- 主要語言
- 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.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
在同一個字串上重現兩次替換,並檢查與使用 flatten 相關的替換邏輯;將其行為與 flattenDeep 進行比較。完成的標準是:重複匹配能保留返回的 React 元件,並且在相關文件中明確說明 callback 需要返回一個陣列。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, react
- 領域
- frontend
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100