diff --git a/src/Forms/VobSubOcr.cs b/src/Forms/VobSubOcr.cs index dd24893bb..5de7d7e68 100644 --- a/src/Forms/VobSubOcr.cs +++ b/src/Forms/VobSubOcr.cs @@ -6427,6 +6427,8 @@ namespace Nikse.SubtitleEdit.Forms private static string FixItalics(string s) { int italicStartCount = Utilities.CountTagInText(s, ""); + if (italicStartCount == 0) + return s; s = s.Replace(Environment.NewLine + " ", Environment.NewLine); s = s.Replace(Environment.NewLine + " ", Environment.NewLine); @@ -6451,7 +6453,8 @@ namespace Nikse.SubtitleEdit.Forms s.IndexOf("", StringComparison.Ordinal) > 1 && s.IndexOf("", StringComparison.Ordinal) < 10 && s.EndsWith("")) s = "" + s.Replace("", string.Empty).Replace("", string.Empty) + ""; s = s.Replace("" + Environment.NewLine + "", Environment.NewLine); - return s; + + return Utilities.FixInvalidItalicTags(s); } private void LogUnknownWords()