mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
fix: replace nbsp with space
This commit is contained in:
parent
0745f5b401
commit
42e0df29ee
@ -55,6 +55,9 @@ export const removeDuplicateSpaces = (name: string) =>
|
|||||||
|
|
||||||
export const replaceDotsWithSpace = (name: string) => name.replace(/\./g, " ");
|
export const replaceDotsWithSpace = (name: string) => name.replace(/\./g, " ");
|
||||||
|
|
||||||
|
export const replaceNbspWithSpace = (name: string) =>
|
||||||
|
name.replace(new RegExp(String.fromCharCode(160), "g"), " ");
|
||||||
|
|
||||||
export const replaceUnderscoreWithSpace = (name: string) =>
|
export const replaceUnderscoreWithSpace = (name: string) =>
|
||||||
name.replace(/_/g, " ");
|
name.replace(/_/g, " ");
|
||||||
|
|
||||||
@ -69,6 +72,7 @@ export const formatName = pipe<string>(
|
|||||||
removeSpecialEditionFromName,
|
removeSpecialEditionFromName,
|
||||||
replaceUnderscoreWithSpace,
|
replaceUnderscoreWithSpace,
|
||||||
replaceDotsWithSpace,
|
replaceDotsWithSpace,
|
||||||
|
replaceNbspWithSpace,
|
||||||
(str) => str.replace(/DIRECTOR'S CUT/g, ""),
|
(str) => str.replace(/DIRECTOR'S CUT/g, ""),
|
||||||
removeSymbolsFromName,
|
removeSymbolsFromName,
|
||||||
removeDuplicateSpaces,
|
removeDuplicateSpaces,
|
||||||
|
Loading…
Reference in New Issue
Block a user