跳转到内容

User:Makecat/AWB/link-xx

维基百科,自由的百科全书
WikiFunctions.Parse.HideText ht = new WikiFunctions.Parse.HideText(true, false, true);
 
        public string ProcessArticle(string ArticleText, string ArticleTitle, int wikiNamespace, out string Summary, out bool Skip)
        {
            Skip = false;
            Summary = "";
 
ArticleText = ht.Hide(ArticleText);

ArticleText=Regex.Replace(ArticleText, @"\[\[:en:(.+?)\|(.+?)\]\]", "{{link-en|$1|$2}}");
ArticleText=Regex.Replace(ArticleText, @"\[\[:en:(.+?)\]\]", "{{link-en|$1}}");
ArticleText=Regex.Replace(ArticleText, @"\[\[(.+?)\]\](\[\[:en:(.+?)(\|.+?)?\]\])", "{{link-en|$1|$2}}");
 
            return ht.AddBack(ArticleText);
 
            return ArticleText;
        }