mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-24 20:22:41 +01:00
Fix #8721
This commit is contained in:
parent
eebef1d7a6
commit
5f07898118
@ -46,14 +46,14 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
sb.AppendLine(s);
|
||||
}
|
||||
}
|
||||
string text = sb.ToString().Replace(Environment.NewLine, " ");
|
||||
var text = sb.ToString().Replace(Environment.NewLine, " ");
|
||||
|
||||
|
||||
var list = new List<string>();
|
||||
var untilLastSpace = new StringBuilder();
|
||||
var fromLastSpace = new StringBuilder();
|
||||
var maxLength = _singleLineMaxLength * _numberOfLines;
|
||||
bool oneLineOnly = _numberOfLines == 1;
|
||||
var oneLineOnly = _numberOfLines == 1;
|
||||
var hardSplitIndices = new List<int>();
|
||||
for (var index = 0; index < text.Length; index++)
|
||||
{
|
||||
@ -87,7 +87,7 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
fromLastSpace.Clear();
|
||||
}
|
||||
else if (_endChars.Contains(ch) && index < text.Length - 2 &&
|
||||
(text[index + 1] == ' ' || _language == "zh") &&
|
||||
(text[index + 1] == ' ' || _language == "zh" || "。、·?".Contains(ch)) &&
|
||||
!CurrentWordInDoNotBreakList(text, index + 1))
|
||||
{
|
||||
fromLastSpace.Append(ch);
|
||||
|
Loading…
Reference in New Issue
Block a user