WikiFunctions.Parse.MetaDataSorter.MoveSeeAlso C# (CSharp) Метод

MoveSeeAlso() публичный статический Метод

Moves the 'see also' section to be above the 'references' section, subject to the limitation that the 'see also' section can't be the last level-2 section. Does not move section when two or more references sections in the same article
public static MoveSeeAlso ( string articleText ) : string
articleText string The wiki text of the article.
Результат string
        public static string MoveSeeAlso(string articleText)
        {
            // is 'see also' section below references?
            Match refSm = ReferencesSection.Match(articleText), seeAm = SeeAlsoSection.Match(articleText);
            string references = refSm.Groups[1].Value, seealso = seeAm.Groups[1].Value;

            if (seeAm.Success && seeAm.Index > refSm.Index && ReferencesSection.Matches(articleText).Count == 1)
            {
                articleText = articleText.Replace(seealso, "");
                articleText = articleText.Replace(references, seealso + "\r\n" + references);
            }
            // newlines are fixed by later logic
            return articleText;
        }