mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Improve "Fix alone lowercase 'i' to upper" slightly
This commit is contained in:
parent
07dfe71c03
commit
077e31fd7e
@ -37,11 +37,15 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
|
||||
.Replace(">" + target + "\u200B" + Environment.NewLine, ">I" + Environment.NewLine) // Zero Width Space
|
||||
.Replace(">" + target + "\uFEFF" + Environment.NewLine, ">I" + Environment.NewLine); // Zero Width No-Break Space
|
||||
|
||||
s = s.Replace(" i-i ", " I-I ");
|
||||
s = s.Replace(" i-i-i ", " I-I-I ");
|
||||
|
||||
// reg-ex
|
||||
Match match = re.Match(s);
|
||||
while (match.Success)
|
||||
{
|
||||
if (s[match.Index] == target && !s.Substring(match.Index).StartsWith("i.e.", StringComparison.Ordinal))
|
||||
if (s[match.Index] == target && !s.Substring(match.Index).StartsWith("i.e.", StringComparison.Ordinal) &&
|
||||
!s.Substring(match.Index).StartsWith("i-", StringComparison.Ordinal))
|
||||
{
|
||||
var prev = '\0';
|
||||
var next = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user