mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Check if paragraph is allowed to fix before stripping HTML tags
This commit is contained in:
parent
18df8da37d
commit
6e365e1ae6
@ -1177,17 +1177,19 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
for (int i = 0; i < Subtitle.Paragraphs.Count; i++)
|
||||
{
|
||||
Paragraph p = Subtitle.Paragraphs[i];
|
||||
|
||||
string s = HtmlUtil.RemoveHtmlTags(p.Text);
|
||||
if (s.Replace(Environment.NewLine, " ").Replace(" ", " ").Length < Configuration.Settings.Tools.MergeLinesShorterThan && p.Text.Contains(Environment.NewLine))
|
||||
if (AllowFix(p, fixAction))
|
||||
{
|
||||
s = Utilities.AutoBreakLine(p.Text, Language);
|
||||
if (AllowFix(p, fixAction) && s != p.Text)
|
||||
string s = HtmlUtil.RemoveHtmlTags(p.Text, true);
|
||||
if (s.Replace(Environment.NewLine, " ").Replace(" ", " ").Length < Configuration.Settings.Tools.MergeLinesShorterThan && p.Text.Contains(Environment.NewLine))
|
||||
{
|
||||
string oldCurrent = p.Text;
|
||||
p.Text = s;
|
||||
noOfShortLines++;
|
||||
AddFixToListView(p, fixAction, oldCurrent, p.Text);
|
||||
s = Utilities.AutoBreakLine(p.Text, Language);
|
||||
if (s != p.Text)
|
||||
{
|
||||
string oldCurrent = p.Text;
|
||||
p.Text = s;
|
||||
noOfShortLines++;
|
||||
AddFixToListView(p, fixAction, oldCurrent, p.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user