File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
import React , { PropTypes } from 'react' ;
2
2
import { render } from 'react-dom' ;
3
- import reactReplaceString from 'react-string-replace' ;
3
+ import reactStringReplace from 'react-string-replace' ;
4
4
5
5
const Demo = React . createClass ( {
6
6
propTypes : {
@@ -18,17 +18,17 @@ const Demo = React.createClass({
18
18
let replacedText ;
19
19
20
20
// Match URLs
21
- replacedText = reactReplaceString ( text , / ( h t t p s ? : \/ \/ \S + ) / g, match => (
21
+ replacedText = reactStringReplace ( text , / ( h t t p s ? : \/ \/ \S + ) / g, match => (
22
22
< a key = { match } href = { match } > { match } </ a >
23
23
) ) ;
24
24
25
25
// Match @-mentions
26
- replacedText = reactReplaceString ( replacedText , / @ ( \w + ) / g, match => (
26
+ replacedText = reactStringReplace ( replacedText , / @ ( \w + ) / g, match => (
27
27
< a key = { match } href = { `https://twitter.com/${ match } ` } > @{ match } </ a >
28
28
) ) ;
29
29
30
30
// Match hashtags
31
- replacedText = reactReplaceString ( replacedText , / # ( \w + ) / g, match => (
31
+ replacedText = reactStringReplace ( replacedText , / # ( \w + ) / g, match => (
32
32
< a key = { match } href = { `https://twitter.com/hashtag/${ match } ` } > #{ match } </ a >
33
33
) ) ;
34
34
You can’t perform that action at this time.
0 commit comments