Jump to content

User:Lightmouse/TestScript

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Lightmouse (talk | contribs) at 09:57, 25 September 2008 (Created page with '// <source lang="CSharp"> WikiFunctions.Parse.HideText ht = new WikiFunctions.Parse.HideText(true, false, true); public string ProcessArticle(strin...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

//

        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);


//Year: temporary change to protext preference dates
            ArticleText = Regex.Replace(ArticleText, @"(?i)(\[\[11 August\]\] )\[\[(2007)\]\]",  "$1xx$2xx");

//year: now remove unprotected linked years
            ArticleText = Regex.Replace(ArticleText, @"(?i)\[\[(2007)\]\]", "$1");
//year: #1. Undo temporary change to preference dates
            ArticleText = Regex.Replace(ArticleText, @"(?i)xx(2007)xx", "[[$1]]");

// return ArticleText;

            return ht.AddBack(ArticleText);
        }
//