mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2025-01-31 13:01:39 +01:00
[NamesList] - Minor fix for IsInNamesMultiWordList().
This commit is contained in:
parent
91fa8d59c5
commit
fd10a31b5b
@ -252,13 +252,15 @@ namespace Nikse.SubtitleEdit.Core.Dictionaries
|
||||
text = text.Replace(Environment.NewLine, " ");
|
||||
text = text.FixExtraSpaces();
|
||||
|
||||
foreach (string s in _namesMultiList)
|
||||
if (_namesMultiList.Contains(word))
|
||||
{
|
||||
if (s.Contains(word) && text.Contains(s))
|
||||
return true;
|
||||
}
|
||||
foreach (string multiWordName in _namesMultiList)
|
||||
{
|
||||
if (text.Contains(multiWordName))
|
||||
{
|
||||
if (s.StartsWith(word + " ", StringComparison.Ordinal) || s.EndsWith(" " + word, StringComparison.Ordinal) || s.Contains(" " + word + " "))
|
||||
return true;
|
||||
if (word == s)
|
||||
if (multiWordName.StartsWith(word + " ", StringComparison.Ordinal) || multiWordName.EndsWith(" " + word, StringComparison.Ordinal) || multiWordName.Contains(" " + word + " "))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user