mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Allow merge length, 200, is not without html/assa tags
This commit is contained in:
parent
1c00135ef3
commit
1fe04ad56d
@ -12232,8 +12232,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
addText = RemoveAssStartAlignmentTag(addText);
|
||||
}
|
||||
|
||||
addText = RemoveAssaKarokeTag(addText);
|
||||
|
||||
if (breakMode == BreakMode.UnbreakNoSpace)
|
||||
{
|
||||
sb.Append(addText);
|
||||
@ -12246,7 +12244,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
endMilliseconds = _subtitle.Paragraphs[index].EndTime.TotalMilliseconds;
|
||||
}
|
||||
|
||||
if (sb.Length > 200)
|
||||
if (HtmlUtil.RemoveHtmlTags(sb.ToString(), true).Length > 200)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -12649,18 +12647,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
return s;
|
||||
}
|
||||
|
||||
private static string RemoveAssaKarokeTag(string text)
|
||||
{
|
||||
var s = text.TrimStart();
|
||||
var end = s.IndexOf('}');
|
||||
if (end > 5 && end < 9 && s.StartsWith("{\\k", StringComparison.Ordinal))
|
||||
{
|
||||
s = s.Remove(0, end + 1);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
private void UpdateStartTimeInfo(TimeCode startTime)
|
||||
{
|
||||
if (_subtitle.Paragraphs.Count > 0 && SubtitleListview1.SelectedItems.Count > 0 && startTime != null)
|
||||
|
Loading…
Reference in New Issue
Block a user