From 7629b9914d4664dfae62e34d7cd4d4c4a7f1dcf7 Mon Sep 17 00:00:00 2001 From: sspanak Date: Wed, 14 Aug 2024 10:22:34 +0300 Subject: [PATCH] the remove-extra-dashes script no longer removes dashes at the beginning or at the end of the words --- scripts/remove-extra-dashes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove-extra-dashes.js b/scripts/remove-extra-dashes.js index 34307800..8a2f8369 100644 --- a/scripts/remove-extra-dashes.js +++ b/scripts/remove-extra-dashes.js @@ -61,7 +61,7 @@ function removeCompoundWords(locale, words, lowerCaseWords, separator) { const uniqueWords = new Set(); words.forEach(w => { // simple words - if (!w.includes(separator)) { + if (!w.includes(separator) || w.startsWith(separator) || w.endsWith(separator)) { uniqueWords.add(w); return; }