[Bugfix] - Fix bug QualifiesForMerge will return incorrect return if nextText Contains html/Ssa tags

This commit is contained in:
ivandrofly 2015-08-23 21:14:51 +01:00
parent 1c9b09ceb0
commit 42cf4f63b8

View File

@ -223,9 +223,9 @@ namespace Nikse.SubtitleEdit.Forms
{ {
if (p != null && p.Text != null && next != null && next.Text != null) if (p != null && p.Text != null && next != null && next.Text != null)
{ {
string s = HtmlUtil.RemoveHtmlTags(p.Text.Trim()); var s = HtmlUtil.RemoveHtmlTags(p.Text.Trim(), true);
var nextText = HtmlUtil.RemoveHtmlTags(next.Text.Trim(), true);
if (p.Text.Length + next.Text.Length < maximumTotalLength && next.StartTime.TotalMilliseconds - p.EndTime.TotalMilliseconds < maximumMillisecondsBetweenLines) if (s.Length + nextText.Length < maximumTotalLength && next.StartTime.TotalMilliseconds - p.EndTime.TotalMilliseconds < maximumMillisecondsBetweenLines)
{ {
if (string.IsNullOrEmpty(s)) if (string.IsNullOrEmpty(s))
return true; return true;
@ -234,8 +234,7 @@ namespace Nikse.SubtitleEdit.Forms
if (!checkBoxOnlyContinuationLines.Checked) if (!checkBoxOnlyContinuationLines.Checked)
return true; return true;
if (isLineContinuation) return isLineContinuation;
return true;
} }
} }
return false; return false;