Netflix cps include white space

This commit is contained in:
Nikolaj Olsson 2017-05-04 21:24:15 +02:00
parent 39f164e7f2
commit ccc48018f3
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ namespace Nikse.SubtitleEdit.Core.NetflixQualityCheck
var oldIgnoreWhiteSpace = Configuration.Settings.General.CharactersPerSecondsIgnoreWhiteSpace; var oldIgnoreWhiteSpace = Configuration.Settings.General.CharactersPerSecondsIgnoreWhiteSpace;
try try
{ {
Configuration.Settings.General.CharactersPerSecondsIgnoreWhiteSpace = false;
foreach (Paragraph p in subtitle.Paragraphs) foreach (Paragraph p in subtitle.Paragraphs)
{ {
var charactersPerSeconds = Utilities.GetCharactersPerSecond(p); var charactersPerSeconds = Utilities.GetCharactersPerSecond(p);

View File

@ -74,7 +74,7 @@ $HorzAlign = Center
int number = 0; int number = 0;
foreach (string line in lines) foreach (string line in lines)
{ {
if (!string.IsNullOrWhiteSpace(line) && line[0] != '$' && !line.StartsWith("//")) if (!string.IsNullOrWhiteSpace(line) && line[0] != '$' && !line.StartsWith("//", StringComparison.Ordinal))
{ {
if (RegexTimeCodes.Match(line).Success) if (RegexTimeCodes.Match(line).Success)
{ {