mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
Merge pull request #7976 from ivandrofly/feature/add-missing-quote
Refactor quotes replacement in FixCommonErrors
This commit is contained in:
commit
b77e613f6f
@ -243,14 +243,20 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utilities.CountTagInText(text, "\"") == 1 && Utilities.CountTagInText(text, "”") == 1)
|
const string doubleQuote = "\"";
|
||||||
|
if (Utilities.CountTagInText(text, doubleQuote) == 1)
|
||||||
{
|
{
|
||||||
return text.Replace("”", "\"");
|
if (Utilities.CountTagInText(text, "”") == 1)
|
||||||
}
|
|
||||||
if (Utilities.CountTagInText(text, "\"") == 1 && Utilities.CountTagInText(text, "“") == 1)
|
|
||||||
{
|
{
|
||||||
return text.Replace("“", "\"");
|
return text.Replace("”", doubleQuote);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Utilities.CountTagInText(text, "“") == 1)
|
||||||
|
{
|
||||||
|
return text.Replace("“", doubleQuote);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user