Do not auto-break dialogues where 1st line ends with: ." - thx XhmikosR :)

This commit is contained in:
niksedk 2014-08-15 16:58:31 +02:00
parent 6eb99f9803
commit 6b7bd80949

View File

@ -550,9 +550,12 @@ namespace Nikse.SubtitleEdit.Logic
{
string dialogS = Utilities.RemoveHtmlTags(text);
var arr = dialogS.Replace(Environment.NewLine, "\n").Split('\n');
if (arr.Length == 2 && arr[0].Trim().StartsWith("-") && arr[1].Trim().StartsWith("-") &&
(arr[0].Trim().EndsWith(".") || arr[0].Trim().EndsWith("!") || arr[0].Trim().EndsWith("?")))
return text;
if (arr.Length == 2)
{
string arr0 = arr[0].Trim().TrimEnd('"').TrimEnd('\'').TrimEnd();
if (arr0.StartsWith("-") && arr[1].Trim().StartsWith("-") && (arr0.EndsWith(".") || arr0.EndsWith("!") || arr0.EndsWith("?")))
return text;
}
}
string s = text;