C# Class CodeKicker.BBCode.BBCodeParser

This class is useful for creating a custom parser. You can customize which tags are available and how they are translated to HTML. In order to use this library, we require a link to http://codekicker.de/ from you. Licensed unter the Creative Commons Attribution 3.0 Licence: http://creativecommons.org/licenses/by/3.0/.
ファイルを表示 Open project: Pablissimo/CodeKicker.BBCode-Mod Class Usage Examples

Public Methods

Method Description
AppendText ( string textToAppend, Stack stack ) : void
BBCodeParser ( ErrorMode errorMode, string textNodeHtmlTemplate, IList tags ) : System
BBCodeParser ( IList tags ) : System
ParseSyntaxTree ( string bbCode ) : SequenceNode
ToHtml ( string bbCode ) : string

Private Methods

Method Description
ErrorOrReturn ( string msgKey ) : bool
MatchStartTag ( string bbCode, int &pos, Stack stack ) : bool
MatchTagEnd ( string bbCode, int &pos, Stack stack ) : bool
MatchTextNode ( string bbCode, int &pos, Stack stack ) : bool
ParseAttributeValue ( string input, int &pos, bool greedyProcessing = false ) : string
ParseChar ( string input, int &pos, char c ) : bool
ParseLimitedWhitespace ( string input, int &pos, int maxNewlinesToConsume ) : bool
ParseName ( string input, int &pos ) : string
ParseTagEnd ( string input, int &pos ) : string
ParseTagStart ( string input, int &pos ) : TagNode
ParseText ( string input, int &pos ) : string
ParseWhitespace ( string input, int &pos ) : bool

Method Details

AppendText() public method

public AppendText ( string textToAppend, Stack stack ) : void
textToAppend string
stack Stack
return void

BBCodeParser() public method

public BBCodeParser ( ErrorMode errorMode, string textNodeHtmlTemplate, IList tags ) : System
errorMode ErrorMode
textNodeHtmlTemplate string
tags IList
return System

BBCodeParser() public method

public BBCodeParser ( IList tags ) : System
tags IList
return System

ParseSyntaxTree() public method

public ParseSyntaxTree ( string bbCode ) : SequenceNode
bbCode string
return CodeKicker.BBCode.SyntaxTree.SequenceNode

ToHtml() public method

public ToHtml ( string bbCode ) : string
bbCode string
return string