Fixed: Remove apostrophe, backtick in contractions
This commit is contained in:
parent
1a1c8e6c08
commit
6a4824c029
|
@ -72,6 +72,14 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||||
[TestCase("I'm the Boss", "Im the Boss")]
|
[TestCase("I'm the Boss", "Im the Boss")]
|
||||||
[TestCase("The Title's", "The Title's")]
|
[TestCase("The Title's", "The Title's")]
|
||||||
[TestCase("I'm after I'm", "Im after I'm")]
|
[TestCase("I'm after I'm", "Im after I'm")]
|
||||||
|
[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("", "")]
|
// [TestCase("", "")]
|
||||||
public void should_get_expected_title_back(string title, string expected)
|
public void should_get_expected_title_back(string title, string expected)
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace NzbDrone.Core.Organizer
|
||||||
private static readonly Regex FileNameCleanupRegex = new Regex(@"([- ._])(\1)+", RegexOptions.Compiled);
|
private static readonly Regex FileNameCleanupRegex = new Regex(@"([- ._])(\1)+", RegexOptions.Compiled);
|
||||||
private static readonly Regex TrimSeparatorsRegex = new Regex(@"[- ._]+$", 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 ScenifyReplaceChars = new Regex(@"[\/]", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
// TODO: Support Written numbers (One, Two, etc) and Roman Numerals (I, II, III etc)
|
// TODO: Support Written numbers (One, Two, etc) and Roman Numerals (I, II, III etc)
|
||||||
|
|
Loading…
Reference in New Issue