mirror of
https://github.com/Radarr/Radarr
synced 2025-01-03 05:44:50 +00:00
Fixed: Remove apostrophe, backtick in contractions
(cherry picked from commit 6a4824c02932ee1bd57c1f4f0644f8bc693f6006) Closes #10178
This commit is contained in:
parent
ae89ae175f
commit
d503e01747
2 changed files with 9 additions and 1 deletions
|
@ -62,6 +62,14 @@ public void Setup()
|
|||
[TestCase("[a] title", "a title")]
|
||||
[TestCase("backslash \\ backlash", "backslash backlash")]
|
||||
[TestCase("I'm the Boss", "Im the Boss")]
|
||||
[TestCase("I've Been Caught", "Ive Been Caught")]
|
||||
[TestCase("I'm Lost", "Im Lost")]
|
||||
[TestCase("That'll Be The Day", "Thatll Be The Day")]
|
||||
[TestCase("I'd Rather Be Alone", "Id Rather Be Alone")]
|
||||
[TestCase("I Can't Die", "I Cant Die")]
|
||||
[TestCase("Won`t Get Fooled Again", "Wont Get Fooled Again")]
|
||||
[TestCase("Don’t Blink", "Dont Blink")]
|
||||
[TestCase("The ` Legend of Kings", "The Legend of Kings")]
|
||||
|
||||
// [TestCase("", "")]
|
||||
public void should_get_expected_title_back(string title, string expected)
|
||||
|
|
|
@ -48,7 +48,7 @@ public class FileNameBuilder : IBuildFileNames
|
|||
private static readonly Regex FileNameCleanupRegex = new Regex(@"([- ._])(\1)+", RegexOptions.Compiled);
|
||||
private static readonly Regex TrimSeparatorsRegex = new Regex(@"[- ._]$", RegexOptions.Compiled);
|
||||
|
||||
private static readonly Regex ScenifyRemoveChars = new Regex(@"(?<=\s)(,|<|>|\/|\\|;|:|'|""|\||`|~|!|\?|@|$|%|^|\*|-|_|=){1}(?=\s)|('|:|\?|,)(?=(?:(?:s|m)\s)|\s|$)|(\(|\)|\[|\]|\{|\})", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private static readonly Regex ScenifyRemoveChars = new Regex(@"(?<=\s)(,|<|>|\/|\\|;|:|'|""|\||`|’|~|!|\?|@|$|%|^|\*|-|_|=){1}(?=\s)|('|`|’|:|\?|,)(?=(?:(?:s|m|t|ve|ll|d|re)\s)|\s|$)|(\(|\)|\[|\]|\{|\})", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private static readonly Regex ScenifyReplaceChars = new Regex(@"[\/]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
private static readonly Regex TitlePrefixRegex = new Regex(@"^(The|An|A) (.*?)((?: *\([^)]+\))*)$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
|
Loading…
Reference in a new issue