Added patch from Issue 39 (fix in AutoBreakLine) - thx Hawke42 :)

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@895 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2012-01-05 16:51:30 +00:00
parent fa233006ce
commit 3a9b172cde

View File

@ -283,10 +283,17 @@ namespace Nikse.SubtitleEdit.Logic
if (temp.Length < mergeLinesShorterThan)
{
string[] lines = text.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
if (lines.Length == 2 && Utilities.RemoveHtmlTags(lines[1]).Trim().StartsWith("-"))
return text;
if (lines.Length == 3 && Utilities.RemoveHtmlTags(lines[1]).Trim().StartsWith("-") && Utilities.RemoveHtmlTags(lines[2]).Trim().StartsWith("-"))
if (lines.Length > 1) {
bool isDialog = true;
foreach (string line in lines) {
string cleanLine = Utilities.RemoveHtmlTags(line).Trim();
isDialog = isDialog && (cleanLine.StartsWith("-") ||
cleanLine.StartsWith("—"));
}
if (isDialog) {
return text;
}
}
return s;
}