[Fix + Update] - Fix (FixUneededPeriods.cs)

This commit is contained in:
ivandrofly 2015-10-18 18:51:28 +01:00
parent 5445b308b9
commit 129013669f

View File

@ -36,15 +36,18 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
p.Text = p.Text.TrimEnd('.');
unneededPeriodsFixed++;
}
var len = p.Text.Length;
if (p.Text.Contains("!. "))
{
p.Text = p.Text.Replace("!. ", "! ");
unneededPeriodsFixed++;
unneededPeriodsFixed += len - p.Text.Length;
len = p.Text.Length;
}
if (p.Text.Contains("?. "))
{
p.Text = p.Text.Replace("?. ", "? ");
unneededPeriodsFixed++;
unneededPeriodsFixed += len - p.Text.Length;
}
if (p.Text != oldText)