C# Class WikiFunctions.Parse.HideText

This class provides functions for 'hiding' certain syntax by replacing it with unique tokens and then adding it back after an operation was performed on text
Show file Open project: reedy/AutoWikiBrowser Class Usage Examples

Public Methods

Method Description
AddBack ( string articleText ) : string

Adds stuff removed by Hide back

AddBackMore ( string articleText ) : string

Adds back hidden stuff from HideMore

AddBackUnformatted ( string articleText ) : string

Adds things removed by HideUnformatted back

Hide ( string articleText ) : string

Hides Unformatted text (nowiki, pre, math, html comments, timelines), source tags Also hides images and external links if set on call to constructor

HideMore ( string articleText ) : string

Hides images, external links, templates, headings

HideMore ( string articleText, bool hideOnlyTargetOfWikilink ) : string

Hides images, external links, templates, headings

HideMore ( string articleText, bool hideOnlyTargetOfWikilink, bool hideWikiLinks ) : string

Hides images, external links, templates, headings and italics

HideMore ( string articleText, bool hideOnlyTargetOfWikilink, bool hideWikiLinks, bool hideItalics ) : string

Hides images, external links, templates, headings

HideText ( ) : System

HideText ( bool hideExternalLinks, bool leaveMetaHeadings, bool hideImages ) : System

Hides Unformatted text (nowiki, pre, math, html comments, timelines), source tags

HideUnformatted ( string articleText ) : string

Hides unformatted text regions: nowiki, pre, math, html comments, timelines

Private Methods

Method Description
AddBack ( string articleText, List Tokens ) : string

Adds stuff removed by Hide back

Replace ( IEnumerable matches, string &articleText ) : void

Puts back hidden text

Replace ( IEnumerable matches, string &articleText, List Tokens ) : void

Puts back hidden text

ReplaceMore ( ICollection matches, string &articleText ) : void

Replaces hidden images, external links, templates, headings etc.

Method Details

AddBack() public method

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

AddBackMore() public method

Adds back hidden stuff from HideMore
public AddBackMore ( string articleText ) : string
articleText string
return string

AddBackUnformatted() public method

Adds things removed by HideUnformatted back
public AddBackUnformatted ( string articleText ) : string
articleText string The wiki text of the article.
return string

Hide() public method

Hides Unformatted text (nowiki, pre, math, html comments, timelines), source tags Also hides images and external links if set on call to constructor
public Hide ( string articleText ) : string
articleText string The wiki text of the article.
return string

HideMore() public method

Hides images, external links, templates, headings
public HideMore ( string articleText ) : string
articleText string the text of the article
return string

HideMore() public method

Hides images, external links, templates, headings
public HideMore ( string articleText, bool hideOnlyTargetOfWikilink ) : string
articleText string the text of the article
hideOnlyTargetOfWikilink bool whether to hide only the target of a wikilink (so that fixes such as typo corrections may be applied to the piped part of the link)
return string

HideMore() public method

Hides images, external links, templates, headings and italics
public HideMore ( string articleText, bool hideOnlyTargetOfWikilink, bool hideWikiLinks ) : string
articleText string the text of the article
hideOnlyTargetOfWikilink bool whether to hide only the target of a wikilink (so that fixes such as typo corrections may be applied to the piped part of the link)
hideWikiLinks bool whether to hide all wikilinks including those with words attached outside the link
return string

HideMore() public method

Hides images, external links, templates, headings
public HideMore ( string articleText, bool hideOnlyTargetOfWikilink, bool hideWikiLinks, bool hideItalics ) : string
articleText string the text of the article
hideOnlyTargetOfWikilink bool whether to hide only the target of a wikilink (so that fixes such as typo corrections may be applied to the piped part of the link)
hideWikiLinks bool whether to hide all wikilinks including those with words attached outside the link
hideItalics bool whether to hide italics
return string

HideText() public method

public HideText ( ) : System
return System

HideText() public method

Hides Unformatted text (nowiki, pre, math, html comments, timelines), source tags
public HideText ( bool hideExternalLinks, bool leaveMetaHeadings, bool hideImages ) : System
hideExternalLinks bool Whether external links should be hidden too
leaveMetaHeadings bool Whether to not hide section headings
hideImages bool Whether images should be hidden too
return System

HideUnformatted() public method

Hides unformatted text regions: nowiki, pre, math, html comments, timelines
public HideUnformatted ( string articleText ) : string
articleText string The wiki text of the article.
return string