Improve new "auto br" for Arabic - thx OmrSi :)

This commit is contained in:
Nikolaj Olsson 2019-11-10 09:23:18 +01:00
parent 0ef41970c3
commit ef127588f8

View File

@ -9,7 +9,8 @@ namespace Nikse.SubtitleEdit.Core
private readonly List<TextSplitResult> _splits; private readonly List<TextSplitResult> _splits;
private readonly List<TextSplitResult> _allSplits; private readonly List<TextSplitResult> _allSplits;
private readonly int _singleLineMaxLength; private readonly int _singleLineMaxLength;
private const string EndLineChars = ".!?…"; private const string EndLineChars = ".!?…؟";
private const string Commas = ",،";
public TextSplit(string text, int singleLineMaxLength, string language) public TextSplit(string text, int singleLineMaxLength, string language)
{ {
@ -53,7 +54,7 @@ namespace Nikse.SubtitleEdit.Core
} }
if (breakEarlyComma) if (breakEarlyComma)
{ {
var s = GetBestEnding(","); var s = GetBestEnding(Commas);
if (s != null) if (s != null)
{ {
return s; return s;