mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Introduce local constant for expected-chars
This commit is contained in:
parent
ca195d26fe
commit
384e90fe57
@ -1281,6 +1281,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
string languageCode = Language;
|
||||
string fixAction = _language.FixMissingSpace;
|
||||
int missingSpaces = 0;
|
||||
const string expectedChars = @"""”<.";
|
||||
for (int i = 0; i < Subtitle.Paragraphs.Count; i++)
|
||||
{
|
||||
Paragraph p = Subtitle.Paragraphs[i];
|
||||
@ -1289,7 +1290,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Match match = FixMissingSpacesReComma.Match(p.Text);
|
||||
while (match.Success)
|
||||
{
|
||||
bool doFix = !@"""”<.".Contains(p.Text[match.Index + 2]);
|
||||
bool doFix = !expectedChars.Contains(p.Text[match.Index + 2]);
|
||||
|
||||
if (doFix && languageCode == "el" && (p.Text.Substring(match.Index).StartsWith("ό,τι", StringComparison.Ordinal) || p.Text.Substring(match.Index).StartsWith("ο,τι", StringComparison.Ordinal)))
|
||||
doFix = false;
|
||||
|
Loading…
Reference in New Issue
Block a user