public InlineLexer(IDictionary<string, LinkObj> links, Options options) { _options = options ?? new Options(); this.links = links; this._rules = new NormalInlineRules(); if (this.links == null) { throw new Exception("Tokens array requires a `links` property."); } if (_options.Gfm) { if (this._options.Breaks) { _rules = new BreaksInlineRules(); } else { _rules = new GfmInlineRules(); } } else if (this._options.Pedantic) { _rules = new PedanticInlineRules(); } }
public Lexer(Options options) { _options = options ?? new Options(); _rules = new NormalBlockRules(); if (_options.Gfm) { if (_options.Tables) { _rules = new TablesBlockRules(); } else { _rules = new GfmBlockRules(); } } }
/// <summary> /// Static Lex Method /// </summary> public static TokensResult Lex(string src, Options options) { var lexer = new Lexer(options); return lexer.Lex(src); }
/// <summary> /// Static Parse Method /// </summary> public static string Parse(TokensResult src, Options options) { var parser = new Parser(options); return parser.Parse(src); }
public Parser(Options options) { this.tokens = new Stack<Token>(); this.token = null; _options = options ?? new Options(); }
public _Marked(Options options) { Options = options ?? new Options(); }
public Renderer(Options options) { Options = options ?? new Options(); }