linkify-it
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -0,1 +1,7 @@ | ||
2.0.3 / 2016-12-09 | ||
------------------ | ||
- Process `|` (asian vertical pipe 0xFF5C) as valid text separator. | ||
2.0.2 / 2016-10-15 | ||
@@ -2,0 +8,0 @@ ------------------ |
@@ -257,4 +257,4 @@ 'use strict'; | ||
// (?!_) cause 1.5x slowdown | ||
self.re.schema_test = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'i'); | ||
self.re.schema_search = RegExp('(^|(?!_)(?:[><]|' + re.src_ZPCc + '))(' + slist + ')', 'ig'); | ||
self.re.schema_test = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i'); | ||
self.re.schema_search = RegExp('(^|(?!_)(?:[><\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig'); | ||
@@ -261,0 +261,0 @@ self.re.pretest = RegExp( |
@@ -19,6 +19,10 @@ 'use strict'; | ||
// Experimental. List of chars, completely prohibited in links | ||
// because can separate it from other part of text | ||
var text_separators = '[><\uff5c]'; | ||
// All possible word characters (everything without punctuation, spaces & controls) | ||
// Defined via punctuation & spaces to save space | ||
// Should be something like \p{\L\N\S\M} (\w but without `_`) | ||
re.src_pseudo_letter = '(?:(?!>|<|' + 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] | ||
@@ -42,3 +46,3 @@ // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')'; | ||
'(?=$|>|<|' + re.src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))'; | ||
'(?=$|' + text_separators + '|' + re.src_ZPCc + ')(?!-|_|:\\d|\\.-|\\.(?!$|' + re.src_ZPCc + '))'; | ||
@@ -50,3 +54,3 @@ re.src_path = | ||
'(?:' + | ||
'(?!' + re.src_ZCc + '|[()[\\]{}.,"\'?!\\-<>]).|' + | ||
'(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\]{}.,"\'?!\\-]).|' + | ||
'\\[(?:(?!' + re.src_ZCc + '|\\]).)*\\]|' + | ||
@@ -161,3 +165,3 @@ '\\((?:(?!' + re.src_ZCc + '|[)]).)*\\)|' + | ||
'(^|<|>|\\(|' + 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 + ')'; | ||
@@ -167,4 +171,4 @@ re.tpl_link_fuzzy = | ||
// but can start with > (markdown blockquote) | ||
'(^|(?![.:/\\-_@])(?:[$+<=>^`|]|' + re.src_ZPCc + '))' + | ||
'((?![$+<=>^`|])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')'; | ||
'(^|(?![.:/\\-_@])(?:[$+<=>^`|\uff5c]|' + re.src_ZPCc + '))' + | ||
'((?![$+<=>^`|\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')'; | ||
@@ -174,6 +178,6 @@ re.tpl_link_no_ip_fuzzy = | ||
// but can start with > (markdown blockquote) | ||
'(^|(?![.:/\\-_@])(?:[$+<=>^`|]|' + re.src_ZPCc + '))' + | ||
'((?![$+<=>^`|])' + 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": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Links recognition library with FULL unicode support", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
34105
649