mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 15:02:35 +01:00
Improve "Find names" in change casing
This commit is contained in:
parent
926deca402
commit
d739694eb8
@ -142,10 +142,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
while (startIndex >= 0 && startIndex < text.Length &&
|
||||
textToLower.Substring(startIndex).Contains(name.ToLower()) && name.Length > 1 && name != name.ToLower())
|
||||
{
|
||||
bool startOk = (startIndex == 0) || (text[startIndex - 1] == ' ') || (text[startIndex - 1] == '-') ||
|
||||
(text[startIndex - 1] == '"') || (text[startIndex - 1] == '\'') || (text[startIndex - 1] == '>') ||
|
||||
(Environment.NewLine.EndsWith(text[startIndex - 1].ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal));
|
||||
|
||||
bool startOk = startIndex == 0 || "([ --'>\r\n¿¡".Contains(text[startIndex - 1]);
|
||||
if (startOk)
|
||||
{
|
||||
int end = startIndex + name.Length;
|
||||
|
Loading…
Reference in New Issue
Block a user