mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 04:33:04 +01:00
Refactor whitespace skipping loop in KaraokeWordTransform
The condition checking and increment operation in the whitespace skipping loop inside the KaraokeWordTransform file has been refactored for better readability. The increment operation (i++) is now placed inside the loop block instead of the while statement.
This commit is contained in:
parent
e4bccc4dca
commit
9cc215b77d
@ -27,7 +27,10 @@ namespace Nikse.SubtitleEdit.Core.Common.TextEffect
|
||||
lastFontCloseIdx = i;
|
||||
result.Add(karaoke);
|
||||
// skip only whitespace
|
||||
while (i < len && char.IsWhiteSpace(text[i])) i++;
|
||||
while (i < len && char.IsWhiteSpace(text[i]))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user