From 1fb7581c55a01576fde094c79abc62c6da5e83af Mon Sep 17 00:00:00 2001 From: David Klebanoff Date: Tue, 28 May 2019 14:56:20 -0700 Subject: [PATCH] Handle accented brand names (#1439) * Handle accented brand names. * Update order of replacement (alphabetic). --- scripts/utils.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/utils.js b/scripts/utils.js index f8c6d775..ae7b38f8 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -13,5 +13,13 @@ module.exports = { .replace(/&$/, "-and") .replace(/&/g, "-and-") .replace(/[ !’]/g, "") + .replace(/à|á|â|ã|ä/, "a") + .replace(/ç/, "c") + .replace(/è|é|ê|ë/, "e") + .replace(/ì|í|î|ï/, "i") + .replace(/ñ/, "n") + .replace(/ò|ó|ô|õ|ö/, "o") + .replace(/ù|ú|û|ü/, "u") + .replace(/ý|ÿ/, "y") ) }