Fix for "Add missing periods" and ASSA tags - thx Firegloom :)

Fix #7952
This commit is contained in:
Nikolaj Olsson 2024-02-21 06:54:42 +01:00
parent 5a2375fa57
commit 9151febbf0
2 changed files with 3 additions and 2 deletions

View File

@ -965,7 +965,7 @@ We leverage the intrinsic rhythm of the image.</CreateSimpleChainingToolTip>
<FixDoubleDash>Fix '--' -&gt; '...'</FixDoubleDash> <FixDoubleDash>Fix '--' -&gt; '...'</FixDoubleDash>
<FixDoubleGreaterThan>Remove '&gt;&gt;'</FixDoubleGreaterThan> <FixDoubleGreaterThan>Remove '&gt;&gt;'</FixDoubleGreaterThan>
<FixEllipsesStart>Remove leading '...'</FixEllipsesStart> <FixEllipsesStart>Remove leading '...'</FixEllipsesStart>
<FixMissingOpenBracket>Fix missing [ in line</FixMissingOpenBracket> <FixMissingOpenBracket>Fix missing [ or ( in line</FixMissingOpenBracket>
<FixMusicNotation>Replace music symbols (e.g. âTª) with preferred symbol</FixMusicNotation> <FixMusicNotation>Replace music symbols (e.g. âTª) with preferred symbol</FixMusicNotation>
<FixDoubleDashExample>'Whoa-- um yeah!' -&gt; 'Whoa... um yeah!'</FixDoubleDashExample> <FixDoubleDashExample>'Whoa-- um yeah!' -&gt; 'Whoa... um yeah!'</FixDoubleDashExample>
<FixDoubleGreaterThanExample>'&gt;&gt; Robert: Sup dude!' -&gt; 'Robert: Sup dude!'</FixDoubleGreaterThanExample> <FixDoubleGreaterThanExample>'&gt;&gt; Robert: Sup dude!' -&gt; 'Robert: Sup dude!'</FixDoubleGreaterThanExample>

View File

@ -66,7 +66,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
nextText = HtmlUtil.RemoveHtmlTags(next.Text, true).TrimStart('-', '"', '„').TrimStart(); nextText = HtmlUtil.RemoveHtmlTags(next.Text, true).TrimStart('-', '"', '„').TrimStart();
} }
var isNextClose = next != null && next.StartTime.TotalMilliseconds - p.EndTime.TotalMilliseconds < 400; var isNextClose = next != null && next.StartTime.TotalMilliseconds - p.EndTime.TotalMilliseconds < 400;
var tempNoHtml = HtmlUtil.RemoveHtmlTags(p.Text) var tempNoHtml = HtmlUtil.RemoveHtmlTags(p.Text, true)
.Replace("\u200B", string.Empty) // Zero Width Space .Replace("\u200B", string.Empty) // Zero Width Space
.Replace("\uFEFF", string.Empty) // Zero Width No-Break Space .Replace("\uFEFF", string.Empty) // Zero Width No-Break Space
.TrimEnd(); .TrimEnd();
@ -196,6 +196,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
} }
} }
} }
callbacks.UpdateFixStatus(missingPeriodsAtEndOfLine, Language.AddPeriods); callbacks.UpdateFixStatus(missingPeriodsAtEndOfLine, Language.AddPeriods);
} }