mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Refactor (minor)
This commit is contained in:
parent
790a3f48ec
commit
631f58c544
@ -361,25 +361,21 @@ namespace Nikse.SubtitleEdit.Core
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
char lastChar = preLine[preLine.Length - 1];
|
||||
if (lastChar == '♪')
|
||||
{
|
||||
char lastChar = preLine[preLine.Length - 1];
|
||||
|
||||
if (lastChar == '♪')
|
||||
string tempPreLine = preLine.Substring(0, preLine.Length - 1).TrimEnd();
|
||||
// update last char
|
||||
if (tempPreLine.Length > 0)
|
||||
{
|
||||
string tempPreLine = preLine.Substring(0, preLine.Length - 1).TrimEnd();
|
||||
// update last char
|
||||
if (tempPreLine.Length > 0)
|
||||
{
|
||||
lastChar = tempPreLine[tempPreLine.Length - 1];
|
||||
}
|
||||
}
|
||||
|
||||
if (lastChar != '♪' && (lastChar == '.' || lastChar == '!' || lastChar == '?' || lastChar == ']' || lastChar == ')' || lastChar == ':' || lastChar == '_'))
|
||||
{
|
||||
return true;
|
||||
lastChar = tempPreLine[tempPreLine.Length - 1];
|
||||
}
|
||||
}
|
||||
if (lastChar == '.' || lastChar == '!' || lastChar == '?' || lastChar == ']' || lastChar == ')' || lastChar == ':' || lastChar == '_')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// previous line ends with music symbol but current line doesn't contains any music symbol
|
||||
if ((preLine.EndsWith('♪') || preLine.EndsWith('♫')) && !Pre.Contains(new[] { '♪', '♫' }))
|
||||
|
Loading…
Reference in New Issue
Block a user