🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

linkify-it

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linkify-it - npm Package Compare versions

Comparing version
5.0.1
to
5.0.2
+44
-41
build/index.cjs.js

@@ -27,3 +27,3 @@ 'use strict';

// Should be something like \p{\L\N\S\M} (\w but without `_`)
re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')';
re.src_pseudo_letter = `(?:(?!${text_separators}|${re.src_ZPCc})${re.src_Any})`;
// The same as abothe but without [0-9]

@@ -37,3 +37,5 @@ // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';

// Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch.
re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\[\\]()]).)+@)?';
// Length is capped to exclude possible rescans till the end and avoid O(n^2)
// DoS. No standard limit, just take something reasonable.
re.src_auth = `(?:(?:(?!${re.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`;

@@ -46,4 +48,4 @@ re.src_port =

'(?=$|' + text_separators + '|' + re.src_ZPCc + ')' +
'(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))';
`(?=$|${text_separators}|${re.src_ZPCc})` +
`(?!${opts['---'] ? '-(?!--)|' : '-|'}_|:\\d|\\.-|\\.(?!$|${re.src_ZPCc}))`;

@@ -55,11 +57,11 @@ re.src_path =

'(?:' +
'(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-;]).|' +
'\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' +
'\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' +
'\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' +
'\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' +
"\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
`(?!${re.src_ZCc}|${text_separators}|[()[\\]{}.,"'?!\\-;]).|` +
`\\[(?:(?!${re.src_ZCc}|\\]).)*\\]|` +
`\\((?:(?!${re.src_ZCc}|[)]).)*\\)|` +
`\\{(?:(?!${re.src_ZCc}|[}]).)*\\}|` +
`\\"(?:(?!${re.src_ZCc}|["]).)+\\"|` +
`\\'(?:(?!${re.src_ZCc}|[']).)+\\'|` +
// allow `I'm_king` if no pair found
"\\'(?=" + re.src_pseudo_letter + '|[-])|' +
`\\'(?=${re.src_pseudo_letter}|[-])|` +

@@ -76,3 +78,3 @@ // google has many dots in "google search" links (#66, #81).

'\\.(?!' + re.src_ZCc + '|[.]|$)|' +
`\\.(?!${re.src_ZCc}|[.]|$)|` +
(opts['---']

@@ -83,11 +85,11 @@ ? '\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate

// allow `,,,` in paths
',(?!' + re.src_ZCc + '|$)|' +
`,(?!${re.src_ZCc}|$)|` +
// allow `;` if not followed by space-like char
';(?!' + re.src_ZCc + '|$)|' +
`;(?!${re.src_ZCc}|$)|` +
// allow `!!!` in paths, but not at the end
'\\!+(?!' + re.src_ZCc + '|[!]|$)|' +
`\\!+(?!${re.src_ZCc}|[!]|$)|` +
'\\?(?!' + re.src_ZCc + '|[?]|$)' +
`\\?(?!${re.src_ZCc}|[?]|$)` +
')+' +

@@ -99,5 +101,7 @@ '|\\/' +

// because emails enclosed in quotes are far more common
// Max name length capped to 64 chars (RFC 5321). This also prevents O(n^2)
// rescans to the end on inputs like `mailto:mailto:...`
re.src_email_name =
'[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*';
'[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}';

@@ -117,3 +121,3 @@ re.src_xn =

'|' +
re.src_pseudo_letter + '{1,63}' +
`${re.src_pseudo_letter}{1,63}` +
')';

@@ -126,5 +130,5 @@

'|' +
'(?:' + re.src_pseudo_letter + ')' +
`(?:${re.src_pseudo_letter})` +
'|' +
'(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +
`(?:${re.src_pseudo_letter}(?:-|${re.src_pseudo_letter}){0,61}${re.src_pseudo_letter})` +
')';

@@ -138,3 +142,3 @@

// '|' +
'(?:(?:(?:' + re.src_domain + ')\\.)*' + re.src_domain/* _root */ + ')' +
`(?:(?:(?:${re.src_domain})\\.)*${re.src_domain})`/* _root */ +
')';

@@ -147,3 +151,3 @@

'|' +
'(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))' +
`(?:(?:(?:${re.src_domain})\\.)+(?:%TLDS%))` +
')';

@@ -153,3 +157,3 @@

'(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))';
`(?:(?:(?:${re.src_domain})\\.)+(?:%TLDS%))`;

@@ -183,8 +187,8 @@ re.src_host_strict =

'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))';
`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${re.src_ZPCc}|>|$))`;
re.tpl_email_fuzzy =
'(^|' + text_separators + '|"|\\(|' + re.src_ZCc + ')' +
'(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')';
`(^|${text_separators}|"|\\(|${re.src_ZCc})` +
`(${re.src_email_name}@${re.tpl_host_fuzzy_strict})`;

@@ -194,4 +198,4 @@ re.tpl_link_fuzzy =

// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')';
`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${re.src_ZPCc}))` +
`((?![$+<=>^\`|\uff5c])${re.tpl_host_port_fuzzy_strict}${re.src_path})`;

@@ -201,4 +205,4 @@ re.tpl_link_no_ip_fuzzy =

// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')';
`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${re.src_ZPCc}))` +
`((?![$+<=>^\`|\uff5c])${re.tpl_host_port_no_ip_fuzzy_strict}${re.src_path})`;

@@ -259,3 +263,3 @@ return re

self.re.http = new RegExp(
'^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'
`^\\/\\/${self.re.src_auth}${self.re.src_host_port_strict}${self.re.src_path}`, 'i'
);

@@ -282,3 +286,3 @@ }

// with code comments
'(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' +
`(?:localhost|(?:(?:${self.re.src_domain})\\.)+${self.re.src_domain_root})` +
self.re.src_port +

@@ -307,3 +311,3 @@ self.re.src_host_terminator +

self.re.mailto = new RegExp(
'^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'
`^${self.re.src_email_name}@${self.re.src_host_strict}`, 'i'
);

@@ -320,3 +324,2 @@ }

// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)
/* eslint-disable-next-line max-len */
const tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]';

@@ -381,3 +384,3 @@

function schemaError (name, val) {
throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val)
throw new Error(`(LinkifyIt) Invalid schema "${name}": ${val}`)
}

@@ -456,8 +459,8 @@

// (?!_) cause 1.5x slowdown
self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i');
self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig');
self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i');
self.re.schema_test = RegExp(`(^|(?!_)(?:[><\uff5c]|${re.src_ZPCc}))(${slist})`, 'i');
self.re.schema_search = RegExp(`(^|(?!_)(?:[><\uff5c]|${re.src_ZPCc}))(${slist})`, 'ig');
self.re.schema_at_start = RegExp(`^${self.re.schema_search.source}`, 'i');
self.re.pretest = RegExp(
'(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',
`(${self.re.schema_test.source})|(${self.re.host_fuzzy_test.source})|@`,
'i'

@@ -843,6 +846,6 @@ );

if (!match.schema) { match.url = 'http://' + match.url; }
if (!match.schema) { match.url = `http://${match.url}`; }
if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {
match.url = 'mailto:' + match.url;
match.url = `mailto:${match.url}`;
}

@@ -849,0 +852,0 @@ };

+10
-11

@@ -54,3 +54,3 @@ import reFactory from './lib/re.mjs'

self.re.http = new RegExp(
'^\\/\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'
`^\\/\\/${self.re.src_auth}${self.re.src_host_port_strict}${self.re.src_path}`, 'i'
)

@@ -77,3 +77,3 @@ }

// with code comments
'(?:localhost|(?:(?:' + self.re.src_domain + ')\\.)+' + self.re.src_domain_root + ')' +
`(?:localhost|(?:(?:${self.re.src_domain})\\.)+${self.re.src_domain_root})` +
self.re.src_port +

@@ -102,3 +102,3 @@ self.re.src_host_terminator +

self.re.mailto = new RegExp(
'^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'
`^${self.re.src_email_name}@${self.re.src_host_strict}`, 'i'
)

@@ -115,3 +115,2 @@ }

// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)
/* eslint-disable-next-line max-len */
const tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]'

@@ -176,3 +175,3 @@

function schemaError (name, val) {
throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val)
throw new Error(`(LinkifyIt) Invalid schema "${name}": ${val}`)
}

@@ -251,8 +250,8 @@

// (?!_) cause 1.5x slowdown
self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i')
self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig')
self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i')
self.re.schema_test = RegExp(`(^|(?!_)(?:[><\uff5c]|${re.src_ZPCc}))(${slist})`, 'i')
self.re.schema_search = RegExp(`(^|(?!_)(?:[><\uff5c]|${re.src_ZPCc}))(${slist})`, 'ig')
self.re.schema_at_start = RegExp(`^${self.re.schema_search.source}`, 'i')
self.re.pretest = RegExp(
'(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',
`(${self.re.schema_test.source})|(${self.re.host_fuzzy_test.source})|@`,
'i'

@@ -638,6 +637,6 @@ )

if (!match.schema) { match.url = 'http://' + match.url }
if (!match.schema) { match.url = `http://${match.url}` }
if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {
match.url = 'mailto:' + match.url
match.url = `mailto:${match.url}`
}

@@ -644,0 +643,0 @@ }

@@ -25,3 +25,3 @@ import { Any, Cc, Z, P } from 'uc.micro'

// Should be something like \p{\L\N\S\M} (\w but without `_`)
re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')'
re.src_pseudo_letter = `(?:(?!${text_separators}|${re.src_ZPCc})${re.src_Any})`
// The same as abothe but without [0-9]

@@ -35,3 +35,5 @@ // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';

// Prohibit any of "@/[]()" in user/pass to avoid wrong domain fetch.
re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\[\\]()]).)+@)?'
// Length is capped to exclude possible rescans till the end and avoid O(n^2)
// DoS. No standard limit, just take something reasonable.
re.src_auth = `(?:(?:(?!${re.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`

@@ -44,4 +46,4 @@ re.src_port =

'(?=$|' + text_separators + '|' + re.src_ZPCc + ')' +
'(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))'
`(?=$|${text_separators}|${re.src_ZPCc})` +
`(?!${opts['---'] ? '-(?!--)|' : '-|'}_|:\\d|\\.-|\\.(?!$|${re.src_ZPCc}))`

@@ -53,11 +55,11 @@ re.src_path =

'(?:' +
'(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-;]).|' +
'\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' +
'\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' +
'\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\}|' +
'\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' +
"\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
`(?!${re.src_ZCc}|${text_separators}|[()[\\]{}.,"'?!\\-;]).|` +
`\\[(?:(?!${re.src_ZCc}|\\]).)*\\]|` +
`\\((?:(?!${re.src_ZCc}|[)]).)*\\)|` +
`\\{(?:(?!${re.src_ZCc}|[}]).)*\\}|` +
`\\"(?:(?!${re.src_ZCc}|["]).)+\\"|` +
`\\'(?:(?!${re.src_ZCc}|[']).)+\\'|` +
// allow `I'm_king` if no pair found
"\\'(?=" + re.src_pseudo_letter + '|[-])|' +
`\\'(?=${re.src_pseudo_letter}|[-])|` +

@@ -74,3 +76,3 @@ // google has many dots in "google search" links (#66, #81).

'\\.(?!' + re.src_ZCc + '|[.]|$)|' +
`\\.(?!${re.src_ZCc}|[.]|$)|` +
(opts['---']

@@ -81,11 +83,11 @@ ? '\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate

// allow `,,,` in paths
',(?!' + re.src_ZCc + '|$)|' +
`,(?!${re.src_ZCc}|$)|` +
// allow `;` if not followed by space-like char
';(?!' + re.src_ZCc + '|$)|' +
`;(?!${re.src_ZCc}|$)|` +
// allow `!!!` in paths, but not at the end
'\\!+(?!' + re.src_ZCc + '|[!]|$)|' +
`\\!+(?!${re.src_ZCc}|[!]|$)|` +
'\\?(?!' + re.src_ZCc + '|[?]|$)' +
`\\?(?!${re.src_ZCc}|[?]|$)` +
')+' +

@@ -97,5 +99,7 @@ '|\\/' +

// because emails enclosed in quotes are far more common
// Max name length capped to 64 chars (RFC 5321). This also prevents O(n^2)
// rescans to the end on inputs like `mailto:mailto:...`
re.src_email_name =
'[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*'
'[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}'

@@ -115,3 +119,3 @@ re.src_xn =

'|' +
re.src_pseudo_letter + '{1,63}' +
`${re.src_pseudo_letter}{1,63}` +
')'

@@ -124,5 +128,5 @@

'|' +
'(?:' + re.src_pseudo_letter + ')' +
`(?:${re.src_pseudo_letter})` +
'|' +
'(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +
`(?:${re.src_pseudo_letter}(?:-|${re.src_pseudo_letter}){0,61}${re.src_pseudo_letter})` +
')'

@@ -136,3 +140,3 @@

// '|' +
'(?:(?:(?:' + re.src_domain + ')\\.)*' + re.src_domain/* _root */ + ')' +
`(?:(?:(?:${re.src_domain})\\.)*${re.src_domain})`/* _root */ +
')'

@@ -145,3 +149,3 @@

'|' +
'(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))' +
`(?:(?:(?:${re.src_domain})\\.)+(?:%TLDS%))` +
')'

@@ -151,3 +155,3 @@

'(?:(?:(?:' + re.src_domain + ')\\.)+(?:%TLDS%))'
`(?:(?:(?:${re.src_domain})\\.)+(?:%TLDS%))`

@@ -181,8 +185,8 @@ re.src_host_strict =

'localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))'
`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${re.src_ZPCc}|>|$))`
re.tpl_email_fuzzy =
'(^|' + text_separators + '|"|\\(|' + re.src_ZCc + ')' +
'(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')'
`(^|${text_separators}|"|\\(|${re.src_ZCc})` +
`(${re.src_email_name}@${re.tpl_host_fuzzy_strict})`

@@ -192,4 +196,4 @@ re.tpl_link_fuzzy =

// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')'
`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${re.src_ZPCc}))` +
`((?![$+<=>^\`|\uff5c])${re.tpl_host_port_fuzzy_strict}${re.src_path})`

@@ -199,6 +203,6 @@ re.tpl_link_no_ip_fuzzy =

// but can start with > (markdown blockquote)
'(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' +
'((?![$+<=>^`|\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')'
`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${re.src_ZPCc}))` +
`((?![$+<=>^\`|\uff5c])${re.tpl_host_port_no_ip_fuzzy_strict}${re.src_path})`
return re
}
{
"name": "linkify-it",
"version": "5.0.1",
"version": "5.0.2",
"description": "Links recognition library with FULL unicode support",

@@ -42,8 +42,9 @@ "keywords": [

"lint": "eslint .",
"test": "npm run lint && npm run build && c8 --exclude build --exclude test -r text -r html -r lcov mocha",
"test": "npm run lint && npm run build && c8 --exclude build --exclude test -r text -r html -r lcov node --test",
"demo": "npm run lint && node support/build_demo.mjs",
"doc": "node support/build_doc.mjs",
"build": "rollup -c support/rollup.config.mjs",
"gh-pages": "npm run demo && npm run doc && shx cp -R doc/ demo/ && gh-pages -d demo -f",
"prepublishOnly": "npm run lint && npm run build && npm run gh-pages"
"gh-pages": "npm run demo && npm run doc && gh-pages -d demo -f",
"prepack": "npm test && npm run build && npm run demo && npm run doc",
"postpublish": "npm run gh-pages"
},

@@ -55,16 +56,10 @@ "dependencies": {

"@rollup/plugin-node-resolve": "^15.2.3",
"ansi": "^0.3.0",
"benchmark": "^2.1.0",
"c8": "^8.0.1",
"eslint": "^8.54.0",
"eslint-config-standard": "^17.1.0",
"c8": "^11.0.0",
"eslint": "^9.39.3",
"gh-pages": "^6.1.0",
"mdurl": "^2.0.0",
"mocha": "^10.2.0",
"mitata": "^1.0.34",
"neostandard": "^0.13.0",
"ndoc": "^6.0.0",
"rollup": "^4.6.1",
"shelljs": "^0.8.4",
"shx": "^0.3.2",
"tlds": "^1.166.0"
"rollup": "^4.6.1"
}
}

@@ -6,4 +6,3 @@ linkify-it

[![NPM version](https://img.shields.io/npm/v/linkify-it.svg?style=flat)](https://www.npmjs.org/package/linkify-it)
[![Coverage Status](https://img.shields.io/coveralls/markdown-it/linkify-it/master.svg?style=flat)](https://coveralls.io/r/markdown-it/linkify-it?branch=master)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/markdown-it/linkify-it)
[![Coverage Status](https://coveralls.io/repos/github/markdown-it/linkify-it/badge.svg?branch=master)](https://coveralls.io/github/markdown-it/linkify-it?branch=master)

@@ -70,3 +69,3 @@ > Links recognition library with FULL unicode support.

self.re.twitter = new RegExp(
'^([a-zA-Z0-9_]){1,15}(?!_)(?=$|' + self.re.src_ZPCc + ')'
`^([a-zA-Z0-9_]){1,15}(?!_)(?=$|${self.re.src_ZPCc})`
);

@@ -85,3 +84,3 @@ }

normalize: function (match) {
match.url = 'https://twitter.com/' + match.url.replace(/^@/, '');
match.url = `https://twitter.com/${match.url.replace(/^@/, '')}`;
}

@@ -88,0 +87,0 @@ });