mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 20:52:44 +01:00
Spell check: Allow user words starting with dash - thx t2YU2m8l83 :)
Fix #4310
This commit is contained in:
parent
2b1cf1e717
commit
712ca5427d
@ -34,6 +34,7 @@
|
||||
* Change preferred ANSI code page for Turkish(1254)/Hebrew(1255)
|
||||
* Keep italic/bold/u from RTF in "Import plain text" - thx George
|
||||
* "Modify selection/uppercase" now ignores tags - thx Lokotito
|
||||
* Spell check: Allow user words starting with dash - thx t2YU2m8l83
|
||||
* FIXED:
|
||||
* Fix for overlap in "Tools -> Adjust durations" - thx Christian
|
||||
* Fix bug in EBU STL ms to frames - thx Lucius Snow
|
||||
|
@ -666,8 +666,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
if (!correct && _wordsIndex > 1 && _words.Count > _wordsIndex &&
|
||||
_words[_wordsIndex - 1].Text.ToLowerInvariant() == "www" &&
|
||||
(_words[_wordsIndex + 1].Text.ToLowerInvariant() == "com" ||
|
||||
_words[_wordsIndex + 1].Text.ToLowerInvariant() == "org" ||
|
||||
(_words[_wordsIndex + 1].Text.ToLowerInvariant() == "com" ||
|
||||
_words[_wordsIndex + 1].Text.ToLowerInvariant() == "org" ||
|
||||
_words[_wordsIndex + 1].Text.ToLowerInvariant() == "net") &&
|
||||
_currentParagraph.Text.IndexOf(_words[_wordsIndex - 1].Text + "." +
|
||||
_currentWord + "." +
|
||||
@ -712,6 +712,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
correct = _spellCheckWordLists.HasUserWord(wordWithDash.Replace("‑", "-"));
|
||||
}
|
||||
|
||||
if (!correct && _spellCheckWordLists.HasUserWord("-" + _currentWord))
|
||||
{
|
||||
correct = true;
|
||||
}
|
||||
}
|
||||
if (!correct && _wordsIndex < _words.Count - 1 && (_currentParagraph.Text[_words[_wordsIndex + 1].Index - 1] == '-' || _currentParagraph.Text[_words[_wordsIndex + 1].Index - 1] == '‑'))
|
||||
{
|
||||
|
@ -1504,6 +1504,11 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!correct && _spellCheckWordLists.HasUserWord("-" + word))
|
||||
{
|
||||
correct = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!correct && word.Contains('/') && !word.Contains("//", StringComparison.Ordinal))
|
||||
|
Loading…
Reference in New Issue
Block a user