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

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

Removes any disambiguation templates from the article text, to be added at bottom later
public static RemoveDisambig ( string &articleText ) : string
articleText string The wiki text of the article.
Результат string
        public static string RemoveDisambig(ref string articleText)
        {
            if (!Variables.LangCode.Equals("en"))
                return "";

            string strDisambig = "";

            // Extract up to one disambig (should not be multiple per page), don't pull out of comments
            if (WikiRegexes.Disambigs.IsMatch(WikiRegexes.Comments.Replace(articleText, "")))
            {
                articleText = WikiRegexes.Disambigs.Replace(articleText, m =>
                                                            {
                                                                strDisambig = m.Value;
                                                                return "";
                                                            }, 1);
            }

            return strDisambig;
        }