C# Class WikiFunctions.WikiDiff

This class renders MediaWiki-like HTML diffs
ファイルを表示 Open project: reedy/AutoWikiBrowser Class Usage Examples

Public Methods

Method Description
DiffHead ( ) : string

Returns style header, from style.css file if present, else default style

GetDiff ( string leftText, string rightText, int contextLines ) : string

Renders diff

ResetCustomStyles ( ) : void
UndoAddition ( int right ) : string
UndoChange ( int left, int right ) : string
UndoDeletion ( int left, int right ) : string

Private Methods

Method Description
ContextHeader ( int left, int right ) : void
ContextLine ( int line ) : void

Renders a context row

LineAdded ( int line ) : void
LineChanged ( int leftLine, int rightLine ) : void
LineDeleted ( int left, int right ) : void
RenderContext ( Diff hunk ) : void
RenderDifference ( Diff hunk ) : void
WhitespaceDiff ( StringBuilder res, Word left, Word right ) : void
WordDiff ( StringBuilder res, Range range, Range otherRange, IList words, IList otherWords ) : void

Method Details

DiffHead() public static method

Returns style header, from style.css file if present, else default style
public static DiffHead ( ) : string
return string

GetDiff() public method

Renders diff
public GetDiff ( string leftText, string rightText, int contextLines ) : string
leftText string Earlier version of the text
rightText string Later version of the text
contextLines int Number of unchanged lines to show around changed ones
return string

ResetCustomStyles() public static method

public static ResetCustomStyles ( ) : void
return void

UndoAddition() public method

public UndoAddition ( int right ) : string
right int
return string

UndoChange() public method

public UndoChange ( int left, int right ) : string
left int
right int
return string

UndoDeletion() public method

public UndoDeletion ( int left, int right ) : string
left int
right int
return string