You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can run multiple replacements on one string by calling the function multiple times on the returned result. For instance, if we want to match URLs, @-mentions and hashtags in a string we could do the following:
See the `example/` directory for a runnable example.
@@ -77,9 +113,11 @@ I wanted an easy way to highlight strings within React **without** breaking Reac
77
113
78
114
#### string
79
115
80
-
Type: `string`
116
+
Type: `string|array`
117
+
118
+
The string or array you would like to do replacement on.
81
119
82
-
The string you would like to do replacement on.
120
+
**NOTE:** When passed an array this is the same as running the replacement on every string within the array. Any non-string values in the array will be left untouched.
0 commit comments