linkify-it
Advanced tools
Comparing version 0.1.5 to 1.0.0
@@ -0,1 +1,12 @@ | ||
1.0.0 / 2015-03-25 | ||
------------------ | ||
- Version bump to 1.0.0 for semver. | ||
- Removed `Cf` class from whitespace & punctuation sets (#10). | ||
- API change. Exported regex names renamed to reflect changes. Update your | ||
custom rules if needed: | ||
- `src_ZPCcCf` -> `src_ZPCc` | ||
- `src_ZCcCf` -> `src_ZCc` | ||
0.1.5 / 2015-03-13 | ||
@@ -2,0 +13,0 @@ ------------------ |
@@ -223,4 +223,4 @@ 'use strict'; | ||
// (?!_) cause 1.5x slowdown | ||
self.re.schema_test = RegExp('(^|(?!_)(?:>|' + re.src_ZPCcCf + '))(' + slist + ')', 'i'); | ||
self.re.schema_search = RegExp('(^|(?!_)(?:>|' + re.src_ZPCcCf + '))(' + slist + ')', 'ig'); | ||
self.re.schema_test = RegExp('(^|(?!_)(?:>|' + re.src_ZPCc + '))(' + slist + ')', 'i'); | ||
self.re.schema_search = RegExp('(^|(?!_)(?:>|' + re.src_ZPCc + '))(' + slist + ')', 'ig'); | ||
@@ -227,0 +227,0 @@ self.re.pretest = RegExp( |
@@ -6,3 +6,2 @@ 'use strict'; | ||
var src_Cc = exports.src_Cc = require('uc.micro/categories/Cc/regex').source; | ||
var src_Cf = exports.src_Cf = require('uc.micro/categories/Cf/regex').source; | ||
var src_Z = exports.src_Z = require('uc.micro/categories/Z/regex').source; | ||
@@ -12,6 +11,6 @@ var src_P = exports.src_P = require('uc.micro/categories/P/regex').source; | ||
// \p{\Z\P\Cc\CF} (white spaces + control + format + punctuation) | ||
var src_ZPCcCf = exports.src_ZPCcCf = [ src_Z, src_P, src_Cc, src_Cf ].join('|'); | ||
var src_ZPCc = exports.src_ZPCc = [ src_Z, src_P, src_Cc ].join('|'); | ||
// \p{\Z\Cc\CF} (white spaces + control + format) | ||
var src_ZCcCf = exports.src_ZCcCf = [ src_Z, src_Cc, src_Cf ].join('|'); | ||
// \p{\Z\Cc} (white spaces + control) | ||
var src_ZCc = exports.src_ZCc = [ src_Z, src_Cc ].join('|'); | ||
@@ -21,5 +20,5 @@ // All possible word characters (everything without punctuation, spaces & controls) | ||
// Should be something like \p{\L\N\S\M} (\w but without `_`) | ||
var src_pseudo_letter = '(?:(?!' + src_ZPCcCf + ')' + src_Any + ')'; | ||
var src_pseudo_letter = '(?:(?!' + src_ZPCc + ')' + src_Any + ')'; | ||
// The same as abothe but without [0-9] | ||
var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCcCf + ')' + src_Any + ')'; | ||
var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')'; | ||
@@ -32,3 +31,3 @@ //////////////////////////////////////////////////////////////////////////////// | ||
exports.src_auth = '(?:(?:(?!' + src_ZCcCf + ').)+@)?'; | ||
exports.src_auth = '(?:(?:(?!' + src_ZCc + ').)+@)?'; | ||
@@ -41,3 +40,3 @@ var src_port = exports.src_port = | ||
'(?=$|' + src_ZPCcCf + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + src_ZPCcCf + '))'; | ||
'(?=$|' + src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + src_ZPCc + '))'; | ||
@@ -49,16 +48,16 @@ var src_path = exports.src_path = | ||
'(?:' + | ||
'(?!' + src_ZCcCf + '|[()[\\]{}.,"\'?!\\-]).|' + | ||
'\\[(?:(?!' + src_ZCcCf + '|\\]).)*\\]|' + | ||
'\\((?:(?!' + src_ZCcCf + '|[)]).)*\\)|' + | ||
'\\{(?:(?!' + src_ZCcCf + '|[}]).)*\\}|' + | ||
'\\"(?:(?!' + src_ZCcCf + '|["]).)+\\"|' + | ||
"\\'(?:(?!" + src_ZCcCf + "|[']).)+\\'|" + | ||
'(?!' + src_ZCc + '|[()[\\]{}.,"\'?!\\-]).|' + | ||
'\\[(?:(?!' + src_ZCc + '|\\]).)*\\]|' + | ||
'\\((?:(?!' + src_ZCc + '|[)]).)*\\)|' + | ||
'\\{(?:(?!' + src_ZCc + '|[}]).)*\\}|' + | ||
'\\"(?:(?!' + src_ZCc + '|["]).)+\\"|' + | ||
"\\'(?:(?!" + src_ZCc + "|[']).)+\\'|" + | ||
"\\'(?=" + src_pseudo_letter + ').|' + // allow `I'm_king` if no pair found | ||
'\\.{2,3}[a-zA-Z0-9%]|' + // github has ... in commit range links. Restrict to | ||
// english & percent-encoded only, until more examples found. | ||
'\\.(?!' + src_ZCcCf + '|[.]).|' + | ||
'\\-(?!' + src_ZCcCf + '|--(?:[^-]|$))(?:[-]+|.)|' + // `---` => long dash, terminate | ||
'\\,(?!' + src_ZCcCf + ').|' + // allow `,,,` in paths | ||
'\\!(?!' + src_ZCcCf + '|[!]).|' + | ||
'\\?(?!' + src_ZCcCf + '|[?]).' + | ||
'\\.(?!' + src_ZCc + '|[.]).|' + | ||
'\\-(?!' + src_ZCc + '|--(?:[^-]|$))(?:[-]+|.)|' + // `---` => long dash, terminate | ||
'\\,(?!' + src_ZCc + ').|' + // allow `,,,` in paths | ||
'\\!(?!' + src_ZCc + '|[!]).|' + | ||
'\\?(?!' + src_ZCc + '|[?]).' + | ||
')+' + | ||
@@ -139,7 +138,7 @@ '|\\/' + | ||
'localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + src_ZPCcCf + '|$))'; | ||
'localhost|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:' + src_ZPCc + '|$))'; | ||
exports.tpl_email_fuzzy = | ||
'(^|>|' + src_ZCcCf + ')(' + src_email_name + '@' + tpl_host_fuzzy_strict + ')'; | ||
'(^|>|' + src_ZCc + ')(' + src_email_name + '@' + tpl_host_fuzzy_strict + ')'; | ||
@@ -149,3 +148,3 @@ exports.tpl_link_fuzzy = | ||
// but can start with > (markdown blockquote) | ||
'(^|(?![.:/\\-_@])(?:[$+<=>^`|]|' + src_ZPCcCf + '))' + | ||
'(^|(?![.:/\\-_@])(?:[$+<=>^`|]|' + src_ZPCc + '))' + | ||
'((?![$+<=>^`|])' + tpl_host_port_fuzzy_strict + src_path + ')'; |
{ | ||
"name": "linkify-it", | ||
"version": "0.1.5", | ||
"version": "1.0.0", | ||
"description": "Links recognition library with FULL unicode support", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -67,3 +67,3 @@ linkify-it | ||
self.re.twitter = new RegExp( | ||
'^([a-zA-Z0-9_]){1,15}(?!_)(?=$|' + self.re.src_ZPCcCf + ')' | ||
'^([a-zA-Z0-9_]){1,15}(?!_)(?=$|' + self.re.src_ZPCc + ')' | ||
); | ||
@@ -70,0 +70,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
28021
1
565