跳至內容

用戶: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;
        }