Fix ASSA new line bug from recent commit

This commit is contained in:
niksedk 2021-09-25 13:27:24 +02:00
parent cfe561c65e
commit 7fa7e9c64b
2 changed files with 3 additions and 2 deletions

View File

@ -890,7 +890,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text"
public static string FormatText(Paragraph p)
{
string text = NormalizeNewLines(p.Text);
string text = p.Text.Replace(Environment.NewLine, "\\N");
if (!text.Contains('<'))
{

View File

@ -10966,8 +10966,9 @@ namespace Nikse.SubtitleEdit.Forms
return;
}
var pre = string.Empty;
var startIdx = currentParagraph.Text.LastIndexOf("<i>", StringComparison.OrdinalIgnoreCase);
string pre;
if (startIdx >= 0 &&
!currentParagraph.Text.Contains("</i>", StringComparison.OrdinalIgnoreCase) &&
nextParagraph.Text.Contains("</i>", StringComparison.OrdinalIgnoreCase))