We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50092f6 commit 5826ab2Copy full SHA for 5826ab2
1 file changed
README.md
@@ -34,7 +34,8 @@ Usage examples
34
##### Example 1
35
36
```js
37
-var linkify = require('linkify-it')();
+import linkifyit from 'linkify-it';
38
+const linkify = linkifyit();
39
40
// Reload full tlds list & add unofficial `.onion` domain.
41
linkify
@@ -61,7 +62,7 @@ console.log(linkify.match('Site github.com!')); // [ {
61
62
63
linkify.add('@', {
64
validate: function (text, pos, self) {
- var tail = text.slice(pos);
65
+ const tail = text.slice(pos);
66
67
if (!self.re.twitter) {
68
self.re.twitter = new RegExp(
0 commit comments