pike.git / lib / modules / Tools.pmod / Markdown.pmod

version» Context lines:

pike.git/lib/modules/Tools.pmod/Markdown.pmod:61:   {    options = default_options + (options||([]));    return Parser(options)->parse(Lexer(options)->lex(md));   }      protected typedef mapping(string:R|mapping(string:R)) RuleMap;      protected object noop = class {    string source;    array split2() { return 0; } -  string _sprintf(int t) { return "noop()"; } +  protected string _sprintf(int t) { return "noop()"; }   }();      protected function make_regexp(R|string regex, void|int opts)   {    regex = (string)regex;    function(string,string,void|bool:function|R) fun, fun2;       R rep = REGX("(^|[^[])\\^");       // In most generated regexps we only want to replace the first occurance
pike.git/lib/modules/Tools.pmod/Markdown.pmod:217:    {    array(string) ret = ({});       ws::matchall(subject, lambda (array a, array b) {    ret += ({ a[0] });    });       return ret;    }    -  string _sprintf(int t) +  protected string _sprintf(int t)    {    switch (t)    {    case 's':    return source;       case 'O':    return "object(" + source + ")";       default:    error("Unhandled sprintf_format (%%%c)! ", t);    break;    }    }    -  string cast(string how) +  protected string cast(string how)    {    return src;    }   }      private RuleMap block_rules;   RuleMap get_block_rules()   {    if (block_rules)    return block_rules;