Skip to content

Commit

Permalink
Support emdash in cutoff for safari
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Jul 20, 2023
1 parent 2024a08 commit 7192080
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 7192080

Please # to comment.