File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 8
8
9
9
import React , { Component , createElement } from 'react' ;
10
10
import PropTypes from 'prop-types' ;
11
- import Autolinker from 'autolinker' ;
11
+ import { Autolinker , AnchorTagBuilder } from 'autolinker/dist/es2015 ' ;
12
12
import {
13
13
Alert ,
14
14
Linking ,
@@ -19,7 +19,7 @@ import {
19
19
import * as Truncate from './truncate' ;
20
20
import matchers from './matchers' ;
21
21
22
- // const tagBuilder = Autolinker.prototype.getTagBuilder ();
22
+ const tagBuilder = new AnchorTagBuilder ( ) ;
23
23
24
24
const styles = StyleSheet . create ( {
25
25
link : {
@@ -249,7 +249,7 @@ export default class Autolink extends Component {
249
249
const matchedText = args [ 0 ] ;
250
250
251
251
matches [ token ] = new Match ( {
252
- // tagBuilder,
252
+ tagBuilder,
253
253
matchedText,
254
254
offset : args [ args . length - 2 ] ,
255
255
[ id ] : matchedText ,
Original file line number Diff line number Diff line change 6
6
* https://github.com/joshswan/react-native-autolink/blob/master/LICENSE
7
7
*/
8
8
9
- import { Match } from 'autolinker' ;
9
+ import { Match } from 'autolinker/dist/es2015 ' ;
10
10
11
11
export default [
12
12
// LatLng
Original file line number Diff line number Diff line change 6
6
* https://github.com/joshswan/react-native-autolink/blob/master/LICENSE
7
7
*/
8
8
9
- import { truncateEnd as end } from 'autolinker/dist/commonjs /truncate/truncate-end' ;
10
- import { truncateMiddle as middle } from 'autolinker/dist/commonjs /truncate/truncate-middle' ;
11
- import { truncateSmart as smart } from 'autolinker/dist/commonjs /truncate/truncate-smart' ;
9
+ import { truncateEnd as end } from 'autolinker/dist/es2015 /truncate/truncate-end' ;
10
+ import { truncateMiddle as middle } from 'autolinker/dist/es2015 /truncate/truncate-middle' ;
11
+ import { truncateSmart as smart } from 'autolinker/dist/es2015 /truncate/truncate-smart' ;
12
12
13
13
export {
14
14
end ,
You can’t perform that action at this time.
0 commit comments