mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
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:
parent
fa233006ce
commit
3a9b172cde
@ -283,10 +283,17 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
if (temp.Length < mergeLinesShorterThan)
|
if (temp.Length < mergeLinesShorterThan)
|
||||||
{
|
{
|
||||||
string[] lines = text.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
string[] lines = text.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||||
if (lines.Length == 2 && Utilities.RemoveHtmlTags(lines[1]).Trim().StartsWith("-"))
|
if (lines.Length > 1) {
|
||||||
return text;
|
bool isDialog = true;
|
||||||
if (lines.Length == 3 && Utilities.RemoveHtmlTags(lines[1]).Trim().StartsWith("-") && Utilities.RemoveHtmlTags(lines[2]).Trim().StartsWith("-"))
|
foreach (string line in lines) {
|
||||||
return text;
|
string cleanLine = Utilities.RemoveHtmlTags(line).Trim();
|
||||||
|
isDialog = isDialog && (cleanLine.StartsWith("-") ||
|
||||||
|
cleanLine.StartsWith("—"));
|
||||||
|
}
|
||||||
|
if (isDialog) {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user