tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-07-14 04:26:46 +03:00
parent 5191f8908e
commit a1bff2168e

View File

@ -758,11 +758,11 @@ var features2lnk =
module.features2lnk = module.features2lnk =
function(features, text){ function(features, text){
features = new RegExp( features = new RegExp(
'( )(' '(\\s)('
+(features +(features
.sort(function(a, b){ return b.length - a.length }) .sort(function(a, b){ return b.length - a.length })
.join('|')) .join('|'))
+')([, ]?)', +')([,\\s]?)',
'g') 'g')
return text return text
.replace(features, function(match, a, b, c){ .replace(features, function(match, a, b, c){