diff --git a/src/rules.ts b/src/rules.ts index 1443a9a0..35848230 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -97,7 +97,7 @@ export const SUFFIX_FILTER_RULES: FilterRule[] = [ ]; /** - * Special filter rules to remove leftoves after filtering text using + * Special filter rules to remove leftovers after filtering text using * `YOUTUBE_TRACK_FILTER_RULES` filter rules. */ export const TRIM_SYMBOLS_FILTER_RULES: FilterRule[] = [ @@ -108,7 +108,7 @@ export const TRIM_SYMBOLS_FILTER_RULES: FilterRule[] = [ // trim trailing white chars and dash { source: /[/,:;~\s"-]+$/, target: '' }, // remove multiple spaces - { source: /\s{1,}/, target: ' ' }, + { source: /\u0020{1,}/, target: ' ' }, ]; /** diff --git a/test/fixtures/functions/youtube.json b/test/fixtures/functions/youtube.json index 7ae4e52f..1e9e9996 100644 --- a/test/fixtures/functions/youtube.json +++ b/test/fixtures/functions/youtube.json @@ -433,5 +433,10 @@ "description": "should remove multiple spaces", "funcParameter": "Imminent (Lyric Video) ft. Joshua Idehen", "expectedValue": "Imminent ft. Joshua Idehen" + }, + { + "description": "shouldn't remove ideographic space", + "funcParameter": "space between", + "expectedValue": "space between" } ]