mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Merge pull request #4391 from OmrSi/use-countcharacters
Use "CountCharacters" in two more places
This commit is contained in:
commit
9bceb27b9b
@ -16,7 +16,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
|
||||
bool tooLong = false;
|
||||
foreach (string line in lines)
|
||||
{
|
||||
if (HtmlUtil.RemoveHtmlTags(line, true).Length > Configuration.Settings.General.SubtitleLineMaximumLength)
|
||||
if (HtmlUtil.RemoveHtmlTags(line, true).CountCharacters(false, Configuration.Settings.General.IgnoreArabicDiacritics) > Configuration.Settings.General.SubtitleLineMaximumLength)
|
||||
{
|
||||
tooLong = true;
|
||||
break;
|
||||
|
@ -228,7 +228,7 @@ namespace Nikse.SubtitleEdit.Core.Forms
|
||||
bool doBreak = false;
|
||||
foreach (var line in s.SplitToLines())
|
||||
{
|
||||
if (HtmlUtil.RemoveHtmlTags(line, true).Length > Configuration.Settings.General.SubtitleLineMaximumLength)
|
||||
if (HtmlUtil.RemoveHtmlTags(line, true).CountCharacters(false, Configuration.Settings.General.IgnoreArabicDiacritics) > Configuration.Settings.General.SubtitleLineMaximumLength)
|
||||
{
|
||||
doBreak = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user