mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Fixed minor bug in "Remove text for hear impaired" - thx pson :)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1346 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
82b58d938e
commit
4642714b99
@ -436,7 +436,12 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (removedInFirstLine && !removedInSecondLine && !text.StartsWith("-") && !text.StartsWith("<i>-"))
|
if (removedInFirstLine && !removedInSecondLine && !text.StartsWith("-") && !text.StartsWith("<i>-"))
|
||||||
insertDash = false;
|
{
|
||||||
|
if (insertDash && removedInFirstLine && (arr[1].StartsWith("-") || arr[1].StartsWith("<i>-")))
|
||||||
|
insertDash = true;
|
||||||
|
else
|
||||||
|
insertDash = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insertDash)
|
if (insertDash)
|
||||||
|
@ -177,10 +177,16 @@ namespace Test
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[TestMethod()]
|
||||||
|
[DeploymentItem("SubtitleEdit.exe")]
|
||||||
|
public void RemoveRemoveNameOfFirstLine()
|
||||||
|
{
|
||||||
|
FormRemoveTextForHearImpaired_Accessor target = new FormRemoveTextForHearImpaired_Accessor();
|
||||||
|
string text = "HECTOR: Hi." + Environment.NewLine + "-Oh, hey, Hector.";
|
||||||
|
string expected = "- Hi." + Environment.NewLine + "- Oh, hey, Hector.";
|
||||||
|
string actual = target.RemoveTextFromHearImpaired(text);
|
||||||
|
Assert.AreEqual(expected, actual);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user