More merge short lines...

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@269 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2011-01-21 05:52:36 +00:00
parent b9e7730f6b
commit 9064caa33e

View File

@ -669,13 +669,18 @@ namespace Nikse.SubtitleEdit.Forms
{
Paragraph p = _subtitle.Paragraphs[i];
if (Utilities.RemoveHtmlTags(p.Text).Length < Configuration.Settings.Tools.MergeLinesShorterThan && p.Text.Contains(Environment.NewLine))
string s = Utilities.RemoveHtmlTags(p.Text);
if (s.Length < Configuration.Settings.Tools.MergeLinesShorterThan && p.Text.Contains(Environment.NewLine))
{
string s = p.Text;
if (!s.Contains(Environment.NewLine + "-") &&
!s.Contains(Environment.NewLine + " -") &&
!s.Contains(Environment.NewLine + "<i> -") &&
!s.Contains(Environment.NewLine + "<i>-"))
s = s.TrimEnd().TrimEnd(".?!:;".ToCharArray());
s = s.TrimStart('-');
if (!s.Contains(".") &&
!s.Contains("?") &&
!s.Contains("!") &&
!s.Contains(":") &&
!s.Contains(";") &&
!s.Contains("-") &&
p.Text != p.Text.ToUpper())
{
if (AllowFix(i + 1, fixAction))
{