Claymore.TalkCleanupWikiBot.Cleanup.StrikeOutSection C# (CSharp) Method

StrikeOutSection() private method

private StrikeOutSection ( WikiPageSection section ) : void
section WikiPageSection
return void
        private void StrikeOutSection(WikiPageSection section)
        {
            Regex wikiLinkRE = new Regex(@"\[{2}(.+?)(\|.+?)?]{2}");

            if (section.Title.ToLower(_l10i.Culture).Contains("{{ok}}") ||
                section.Title.ToLower(_l10i.Culture).Contains("{{ок}}") ||
                section.Title.ToLower(_l10i.Culture).Contains("{{x}}") ||
                section.Subsections.Count(s => s.Title.Trim() == "Итог") > 0)
            {
                if (!section.Title.Contains("<s>"))
                {
                    section.Title = string.Format(" <s>{0}</s> ",
                        section.Title.Trim());
                }

                foreach (WikiPageSection subsection in section.Subsections)
                {
                    Match m = wikiLinkRE.Match(subsection.Title);
                    if (m.Success && !subsection.Title.Contains("<s>"))
                    {
                        subsection.Title = string.Format(" <s>{0}</s> ",
                            subsection.Title.Trim());
                    }
                }
            }
            section.ForEach(StrikeOutSection);
        }