/// <summary>
/// Checks that the bold just added to the article is the first bold in the article, and that it's within the first 5% of the HideMore article OR immediately after the infobox
/// </summary>
private bool AddedBoldIsValid(string articleText, string escapedTitle)
{
HideText Hider2 = new HideText(true, true, true);
Regex RegexBoldAdded = new Regex(@"^(.*?)'''(" + escapedTitle + @")", RegexOptions.Singleline | RegexOptions.IgnoreCase);
int boldAddedPos = RegexBoldAdded.Match(articleText).Groups[2].Index;
int firstBoldPos = RegexFirstBold.Match(articleText).Length;
articleText = WikiRegexes.NestedTemplates.Replace(articleText, "");
articleText = Hider2.HideMore(articleText);
// was bold added in first 5% of article?
bool inFirst5Percent = false;
int articlelength = articleText.Length;
if (articlelength > 5)
{
inFirst5Percent = articleText.Trim().Substring(0, Math.Max(articlelength / 20, 5)).Contains("'''");
}
articleText = Hider2.AddBackMore(articleText);
// check that the bold added is the first bit in bold in the main body of the article, and in first 5% of HideMore article
return(inFirst5Percent && boldAddedPos <= firstBoldPos);
}