mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2025-01-31 13:01:39 +01:00
Merge pull request #2048 from ivandrofly/sub_formats
[SubtitleFormat] - Update/Fix
This commit is contained in:
commit
b0d0fe0223
@ -29,7 +29,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
|
||||
public override bool IsMine(List<string> lines, string fileName)
|
||||
{
|
||||
var trimmedLines = new List<string>();
|
||||
int totalRead = 0;
|
||||
int errors = 0;
|
||||
foreach (string line in lines)
|
||||
{
|
||||
@ -42,7 +42,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
{
|
||||
string s = RemoveIllegalSpacesAndFixEmptyCodes(line);
|
||||
if (RegexMicroDvdLine.IsMatch(s))
|
||||
trimmedLines.Add(s);
|
||||
totalRead++;
|
||||
else
|
||||
errors++;
|
||||
}
|
||||
@ -52,7 +52,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
}
|
||||
}
|
||||
Errors = null;
|
||||
return trimmedLines.Count > errors;
|
||||
return totalRead > errors;
|
||||
}
|
||||
|
||||
private static string RemoveIllegalSpacesAndFixEmptyCodes(string line)
|
||||
|
Loading…
x
Reference in New Issue
Block a user