Merge pull request #8059 from ivandrofly/feature/typo

Rename variable in FixDoubleGreaterThanHelper
This commit is contained in:
Nikolaj Olsson 2024-03-24 04:47:45 +01:00 committed by GitHub
commit d29e9b8f19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -608,10 +608,10 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
public static string FixDoubleGreaterThanHelper(string text) public static string FixDoubleGreaterThanHelper(string text)
{ {
var post = string.Empty; var pre = string.Empty;
if (text.Length > 3 && text[0] == '<' && text[2] == '>' && (text[1] == 'i' || text[1] == 'b' || text[1] == 'u')) if (text.Length > 3 && text[0] == '<' && text[2] == '>' && (text[1] == 'i' || text[1] == 'b' || text[1] == 'u'))
{ {
post += "<" + text[1] + ">"; pre += "<" + text[1] + ">";
text = text.Remove(0, 3).TrimStart(); text = text.Remove(0, 3).TrimStart();
} }
@ -620,7 +620,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
var endIdx = text.IndexOf('>', 5); var endIdx = text.IndexOf('>', 5);
if (endIdx >= 5 && endIdx < text.Length - 7) if (endIdx >= 5 && endIdx < text.Length - 7)
{ {
post += text.Substring(0, endIdx + 1); pre += text.Substring(0, endIdx + 1);
text = text.Substring(endIdx + 1).TrimStart(); text = text.Substring(endIdx + 1).TrimStart();
} }
} }
@ -630,7 +630,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
text = text.TrimStart('>', ' ').TrimStart(); text = text.TrimStart('>', ' ').TrimStart();
} }
return post + text; return pre + text;
} }
private static readonly char[] NoShortLineList = { '.', '?', '!', ':', ';', '…', '♪', '♫' }; private static readonly char[] NoShortLineList = { '.', '?', '!', ':', ';', '…', '♪', '♫' };