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