mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 11:42:36 +01:00
Fixed bug in "Fix invalid italic tags" - thx XhmikosR :)
This commit is contained in:
parent
62a7550500
commit
a0842b1357
@ -2714,7 +2714,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
isStart = true;
|
||||
if (text.EndsWith(endTag) || text.EndsWith(e1) || text.EndsWith(e2) || text.EndsWith(e3) || text.EndsWith(e4) || text.EndsWith(e5))
|
||||
isEnd = true;
|
||||
return isStart == isEnd;
|
||||
return isStart && isEnd;
|
||||
}
|
||||
|
||||
public static Paragraph GetOriginalParagraph(int index, Paragraph paragraph, List<Paragraph> originalParagraphs)
|
||||
|
@ -71,6 +71,24 @@ namespace Test
|
||||
Assert.AreEqual(s2, "<i>Line 1." + Environment.NewLine + "Line 2.</i>");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[DeploymentItem("SubtitleEdit.exe")]
|
||||
public void FixInvalidItalicTags4()
|
||||
{
|
||||
string s1 = "It <i>is</i> a telegram," + Environment.NewLine + "it <i>is</i> ordering an advance,";
|
||||
string s2 = Utilities.FixInvalidItalicTags(s1);
|
||||
Assert.AreEqual(s2, s1);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[DeploymentItem("SubtitleEdit.exe")]
|
||||
public void FixInvalidItalicTags5()
|
||||
{
|
||||
string s1 = "- <i>It is a telegram?</i>" + Environment.NewLine + "<i>- It is.</i>";
|
||||
string s2 = Utilities.FixInvalidItalicTags(s1);
|
||||
Assert.AreEqual(s2, "<i>- It is a telegram?" + Environment.NewLine + "- It is.</i>");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[DeploymentItem("SubtitleEdit.exe")]
|
||||
public void FixUnneededSpacesDoubleSpace1()
|
||||
|
Loading…
Reference in New Issue
Block a user