WikiFunctions.Parse.HideText.AddBack C# (CSharp) Method

AddBack() public method

Adds stuff removed by Hide back
public AddBack ( string articleText ) : string
articleText string The wiki text of the article.
return string
        public string AddBack(string articleText)
        {
            return AddBack(articleText, HiddenTokens);
        }

Same methods

HideText::AddBack ( string articleText, List Tokens ) : string

Usage Example

Example #1
0
        /// <summary>
        /// Extracts all of the interwiki and interwiki featured article links from the article text
        /// Ignores interwikis in comments/nowiki tags
        /// </summary>
        /// <param name="articleText">Article text with interwiki and interwiki featured article links removed</param>
        /// <returns>string of interwiki and interwiki featured article links</returns>
        public string Interwikis(ref string articleText)
        {
            string interWikiComment = "";

            if (InterLangRegex.IsMatch(articleText))
            {
                interWikiComment = InterLangRegex.Match(articleText).Value;
                articleText      = articleText.Replace(interWikiComment, "");
            }

            // http://en.wikipedia.org/wiki/Wikipedia_talk:AutoWikiBrowser/Bugs/Archive_12#Interwiki_links_moved_out_of_comment
            HideText hider = new HideText(false, true, false);

            articleText = hider.Hide(articleText);

            string interWikis = ListToString(RemoveLinkFGAs(ref articleText));

            if (interWikiComment.Length > 0)
            {
                interWikis += interWikiComment + "\r\n";
            }

            interWikis += ListToString(RemoveInterWikis(ref articleText));

            articleText = hider.AddBack(articleText);

            return(interWikis);
        }
All Usage Examples Of WikiFunctions.Parse.HideText::AddBack