mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Merge pull request #908 from ivandrofly/patch-2
Remove tags before checking length (src/Forms/AutoBreakUnbreakLines.cs)
This commit is contained in:
commit
4705b944e5
@ -106,15 +106,15 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var sub = new Subtitle();
|
||||
foreach (Paragraph p in _paragraphs)
|
||||
sub.Paragraphs.Add(p);
|
||||
string language = Utilities.AutoDetectGoogleLanguage(sub);
|
||||
var language = Utilities.AutoDetectGoogleLanguage(sub);
|
||||
|
||||
listViewFixes.BeginUpdate();
|
||||
listViewFixes.Items.Clear();
|
||||
foreach (Paragraph p in _paragraphs)
|
||||
{
|
||||
if (p.Text.Length > minLength || p.Text.Contains(Environment.NewLine))
|
||||
if (HtmlUtil.RemoveHtmlTags(p.Text, true).Length > minLength || p.Text.Contains(Environment.NewLine))
|
||||
{
|
||||
string text = Utilities.AutoBreakLine(p.Text, 5, MergeLinesShorterThan, language);
|
||||
var text = Utilities.AutoBreakLine(p.Text, 5, MergeLinesShorterThan, language);
|
||||
if (text != p.Text)
|
||||
{
|
||||
AddToListView(p, text);
|
||||
@ -179,7 +179,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
for (int i = _paragraphs.Count - 1; i >= 0; i--)
|
||||
{
|
||||
Paragraph p = _paragraphs[i];
|
||||
var p = _paragraphs[i];
|
||||
if (_notAllowedFixes.Contains(p.ID))
|
||||
{
|
||||
_fixedText.Remove(p.ID);
|
||||
|
Loading…
Reference in New Issue
Block a user