Fix minor formatting

This commit is contained in:
Nikolaj Olsson 2024-03-29 06:37:42 +01:00
parent 851a668645
commit d3cb4c8053

View File

@ -596,7 +596,7 @@ namespace Nikse.SubtitleEdit.Core.Common
}
var len = text.Length;
int index = 0;
var index = 0;
while (index < len && text[index] == '<')
{
index = text.IndexOf('>', index + 1);
@ -618,9 +618,12 @@ namespace Nikse.SubtitleEdit.Core.Common
fromLenIdx = fromLenIdx > 0 ? fromLenIdx : len;
// no formattable text in between
if (fromLenIdx < index) return false;
if (fromLenIdx < index)
{
return false;
}
for (int i = index; i <= fromLenIdx; i++)
for (var i = index; i <= fromLenIdx; i++)
{
if (char.IsLetterOrDigit(text[i]))
{