mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Minor improve of "Fix italic" - thx Aleksander :)
This commit is contained in:
parent
c3c3aac69f
commit
522d4639f8
@ -563,6 +563,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
text = text.Replace("< I >", beginTag);
|
||||
text = text.Replace("< I>", beginTag);
|
||||
text = text.Replace("<I >", beginTag);
|
||||
text = text.Replace("<i<", beginTag);
|
||||
text = text.Replace("<I<", beginTag);
|
||||
|
||||
text = text.Replace("< / i >", endTag);
|
||||
text = text.Replace("< /i>", endTag);
|
||||
@ -579,6 +581,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
text = text.Replace("</I >", endTag);
|
||||
text = text.Replace("</ I >", endTag);
|
||||
text = text.Replace("< / I>", endTag);
|
||||
text = text.Replace("</i<", beginTag);
|
||||
text = text.Replace("</I<", beginTag);
|
||||
|
||||
text = text.Replace("<I>", beginTag);
|
||||
text = text.Replace("</I>", endTag);
|
||||
|
@ -437,6 +437,14 @@ namespace Test.Logic
|
||||
Assert.AreEqual(s2, "{\\an8}<i>Hallo!" + Environment.NewLine + "Hallo!</i>");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void FixInvalidItalicTagsBadStartTag()
|
||||
{
|
||||
var s1 = "<i<Hallo!<i/>";
|
||||
string s2 = HtmlUtil.FixInvalidItalicTags(s1);
|
||||
Assert.AreEqual( "<i>Hallo!</i>", s2);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void FixUnneededSpacesDoubleSpace1()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user