Merge pull request #5140 from ivandrofly/feature/fix-italic

remove redundant fix
This commit is contained in:
Nikolaj Olsson 2021-06-20 18:18:14 +02:00 committed by GitHub
commit 046afd12f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,10 +13,6 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
public void Fix(Subtitle subtitle, IFixCallbacks callbacks)
{
const string beginTagUpper = "<I>";
const string endTagUpper = "</I>";
const string beginTag = "<i>";
const string endTag = "</i>";
string fixAction = Language.FixInvalidItalicTag;
int noOfInvalidHtmlTags = 0;
for (int i = 0; i < subtitle.Paragraphs.Count; i++)
@ -26,13 +22,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
var text = subtitle.Paragraphs[i].Text;
if (text.Contains('<'))
{
if (!text.Contains("i>") && !text.Contains("<i"))
{
text = text.Replace(beginTagUpper, beginTag).Replace(endTagUpper, endTag);
}
string oldText = text;
text = HtmlUtil.FixInvalidItalicTags(text);
if (text != oldText)
{