mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
parent
b894d011d1
commit
08af9eea3b
@ -25,6 +25,7 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
private static readonly Regex NumberSeparatorNumberRegEx = new Regex(@"\b\d+[\.:;] \d+\b", RegexOptions.Compiled);
|
||||
private static readonly Regex RegexIsNumber = new Regex("^\\d+$", RegexOptions.Compiled);
|
||||
private static readonly Regex RegexIsEpisodeNumber = new Regex("^\\d+x\\d+$", RegexOptions.Compiled);
|
||||
private static readonly Regex RegexNumberSpacePeriod = new Regex(@"(\d) (\.)", RegexOptions.Compiled);
|
||||
|
||||
public static string[] VideoFileExtensions { get; } = { ".avi", ".mkv", ".wmv", ".mpg", ".mpeg", ".divx", ".mp4", ".asf", ".flv", ".mov", ".m4v", ".vob", ".ogv", ".webm", ".ts", ".m2ts", ".mts", ".avs", ".mxf" };
|
||||
public static string[] AudioFileExtensions { get; } = { ".mp3", ".wav", ".wma", ".ogg", ".mpa", ".m4a", ".ape", ".aiff", ".flac", ".aac", ".ac3", ".eac3", ".mka" };
|
||||
@ -2179,6 +2180,11 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
text = new Regex(@"([0456789]) (th)\b").Replace(text, "$1$2");
|
||||
}
|
||||
|
||||
if ("en-da-es-sv-de-nb-cz".Contains(language) && text.ContainsNumber())
|
||||
{
|
||||
text = RegexNumberSpacePeriod.Replace(text, "$1$2");
|
||||
}
|
||||
|
||||
if (language != "fr") // special rules for French
|
||||
{
|
||||
if (text.Contains(" !"))
|
||||
|
Loading…
Reference in New Issue
Block a user