fix: 🐛 trimming leading and trailing spaces in issue title

empty spaces can bring false positives

re #12
This commit is contained in:
bubkoo 2021-01-12 13:45:29 +08:00
parent 0d07e57247
commit e0aa68fcba
2 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
{
"name": "potential-duplicates",
"description": "A Github Action to search for potential issue duplicates using DamerauLevenshtein algorithm.",
"version": "1.0.5",
"version": "1.0.6",
"main": "dist/index.js",
"repository": "https://github.com/bubkoo/potential-duplicates",
"author": "bubkoo <bubkoo.wy@gmail.com>",

View File

@ -46,6 +46,7 @@ export namespace Util {
.filter((keyworld) => keyworld.length > 0)
.reduce((memo, keyworld) => memo.replace(keyworld, ''), title)
.replace(/\s+/, ' ')
.trim()
}
return title
}