Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/Linkify.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as React from 'react';

import defaultComponentDecorator from 'decorators/defaultComponentDecorator';
import defaultHrefDecorator from 'decorators/defaultHrefDecorator';
import defaultMatchDecorator from 'decorators/defaultMatchDecorator';
import defaultMatchDecorator, { linkify } from 'decorators/defaultMatchDecorator';
import defaultTextDecorator from 'decorators/defaultTextDecorator';

type Props = {
Expand Down Expand Up @@ -78,4 +78,6 @@ class Linkify extends React.Component<Props, {}> {
}
}

export { linkify };

export default Linkify;
2 changes: 2 additions & 0 deletions src/decorators/defaultMatchDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import tlds from 'tlds';
const linkify = new LinkifyIt();
linkify.tlds(tlds);

export { linkify };

export default (text: string): Array<Object> => {
return linkify.match(text);
};
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Linkify from 'components/Linkify';
import Linkify, { linkify } from 'components/Linkify';

export { linkify };

export default Linkify;