From 719208049814059ac8f5ec95aa2808241b3011e7 Mon Sep 17 00:00:00 2001 From: Ajay Date: Thu, 20 Jul 2023 01:56:33 -0400 Subject: [PATCH] Support emdash in cutoff for safari --- webpack/webpack.common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index 0be2e36..46eb2d1 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -172,9 +172,9 @@ module.exports = env => { if (path.includes("/en/")) { parsed.deArrowFullName.message = parsed.deArrowFullName.message.replace(" - Better Titles and Thumbnails on YouTube", " for YouTube"); } else if (parsed.deArrowFullName) { - parsed.deArrowFullName.message = parsed.deArrowFullName.message.match(/^.+(?= -)/)?.[0] || parsed.deArrowFullName.message; + parsed.deArrowFullName.message = parsed.deArrowFullName.message.match(/^.+(?= -| –)/)?.[0] || parsed.deArrowFullName.message; if (parsed.deArrowFullName.message.length > 40) { - parsed.deArrowFullName.message = parsed.deArrowFullName.message.slice(0, 47) + "..."; + parsed.deArrowFullName.message = parsed.deArrowFullName.message.slice(0, 37) + "..."; } } else { parsed.deArrowFullName = {