mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Minor fix in Fix common errors - Fix missing period... thx Joel :)
This commit is contained in:
parent
cea103923f
commit
bbed109adb
@ -2071,8 +2071,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
tempNoHtml.Length > 0 &&
|
||||
(!",.!?:;>-])♪♫…".Contains(tempNoHtml[tempNoHtml.Length - 1].ToString())))
|
||||
{
|
||||
string tempTrimmed = tempNoHtml.TrimEnd().TrimEnd(new char[] { '\'', '"', '“', '”' }).TrimEnd();
|
||||
if (!tempNoHtml.EndsWith(")") && !tempNoHtml.EndsWith("]") && !tempNoHtml.EndsWith("*") && !tempNoHtml.EndsWith("#") && !tempNoHtml.EndsWith("¶") && // hear impaired
|
||||
!tempNoHtml.EndsWith(".\"") && !tempNoHtml.EndsWith("!\"") && !tempNoHtml.EndsWith("?\"") && !tempNoHtml.EndsWith(".“") && !tempNoHtml.EndsWith(".”"))
|
||||
!tempTrimmed.EndsWith(".") && !tempTrimmed.EndsWith("!") && !tempTrimmed.EndsWith("?"))
|
||||
{
|
||||
if (p.Text != p.Text.ToUpper())
|
||||
{
|
||||
|
@ -312,6 +312,17 @@ namespace Test
|
||||
target.FixMissingPeriodsAtEndOfLine();
|
||||
Assert.AreEqual(target._subtitle.Paragraphs[0].Text, "<i>This is line one!" + Environment.NewLine + "Boy.</i>");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[DeploymentItem("SubtitleEdit.exe")]
|
||||
public void FixMissingPeriodsAtEndOfLineWithSpace()
|
||||
{
|
||||
var target = GetFixCommonErrorsLib();
|
||||
InitializeFixCommonErrorsLine(target, "”... and gently down I laid her. ”");
|
||||
target.FixMissingPeriodsAtEndOfLine();
|
||||
Assert.AreEqual(target._subtitle.Paragraphs[0].Text, "”... and gently down I laid her. ”");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fix Hyphens (add dash)
|
||||
|
Loading…
Reference in New Issue
Block a user