C# Class ScrewTurn.Wiki.ReverseFormatter

Implements reverse formatting methods (HTML->WikiMarkup).
显示文件 Open project: mono/ScrewTurnWiki Class Usage Examples

Public Methods

Method Description
ReverseFormat ( string html ) : string

Reverse formats HTML content into WikiMarkup.

Private Methods

Method Description
BuildListTree ( bool ordered, string html ) : HtmlList

Builds a list tree.

BuildListWikiMarkup ( HtmlList list, string previousBullets ) : string

Builds the WikiMarkup for a list.

FindAnchestor ( HtmlList root, HtmlList current ) : HtmlList

Finds the anchestor of a list in a tree.

FindTagsPair ( StringBuilder sb, string openTag, string closeTag, int startIndex, int &openIndex, int &closeIndex ) : bool

Finds the position of a matched tag pair.

FirstIndexOfAny ( string input, int startIndex, int &stringFound ) : int

Finds the index of the first string.

GetCurrentRequestMainUrl ( ) : string

Gets the current request main URL, such as http://www.server.com/Wiki/.

GetProviderAndFileAndPage ( string rawUrl, string &provider, string &page, string &file ) : void

Gets the provider and file of a link or URL.

PrepareImageUrl ( string rawUrl ) : string

Prepares an image URL.

PrepareLink ( string rawUrl ) : string

Prepares a link URL.

ProcessList ( bool ordered, string html ) : string

Processes an unordered or ordered list.

ProcessLists ( StringBuilder sb ) : void

Processes unordered and ordered lists.

UrlDecode ( string input ) : string

Decodes a URL-encoded string, even if it was encoded multiple times.

It seems that in some cases URL encoding occurs multiple times, one on the server and one on the client.

Method Details

ReverseFormat() public static method

Reverse formats HTML content into WikiMarkup.
public static ReverseFormat ( string html ) : string
html string The input HTML.
return string