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 =
function(features, text){
features = new RegExp(
'( )('
'(\\s)('
+(features
.sort(function(a, b){ return b.length - a.length })
.join('|'))
+')([, ]?)',
+')([,\\s]?)',
'g')
return text
.replace(features, function(match, a, b, c){