Skip to content

document methods on base classes #2

Open

Description

@freeman-lab

We need to document the methods available on the base data types rather than just images and series thanks to @kkcthans for flagging this!

Activity

  1. boazmohar commented on Jul 25, 2016

    @boazmohar
    Contributor

    @freeman-lab I thought I could contribute here, but not sure exactly how, should I start by adding a base.md and maybe also a blocks.md?
    Do you generate these *.md files automatically from the repo?

  2. freeman-lab commented on Jul 27, 2016

    @freeman-lab
    MemberAuthor

    Just updated the README with more detailed info on how to build and where different components are sourced from, hopefully that helps!

  3. boazmohar commented on Jul 27, 2016

    @boazmohar
    Contributor

    @freeman-lab Thanks!
    I was able to npm install and changes conf.js and run npm run build
    I tried to npm start and I get the following error in marked.js:1226

    Uncaught TypeError: Cannot read property 'replace' of undefined
    Please report this to https://github.com/chjj/marked.
    

    Here is the code (!!!! marks line 1226):

    /**
     * Marked
     */
    
    function marked(src, opt, callback) {
      if (callback || typeof opt === 'function') {
        if (!callback) {
          callback = opt;
          opt = null;
        }
    
        opt = merge({}, marked.defaults, opt || {});
    
        var highlight = opt.highlight
          , tokens
          , pending
          , i = 0;
    
        try {
          tokens = Lexer.lex(src, opt)
        } catch (e) {
          return callback(e);
        }
    
        pending = tokens.length;
    
        var done = function(err) {
          if (err) {
            opt.highlight = highlight;
            return callback(err);
          }
    
          var out;
    
          try {
            out = Parser.parse(tokens, opt);
          } catch (e) {
            err = e;
          }
    
          opt.highlight = highlight;
    
          return err
            ? callback(err)
            : callback(null, out);
        };
    
        if (!highlight || highlight.length < 3) {
          return done();
        }
    
        delete opt.highlight;
    
        if (!pending) return done();
    
        for (; i < tokens.length; i++) {
          (function(token) {
            if (token.type !== 'code') {
              return --pending || done();
            }
            return highlight(token.text, token.lang, function(err, code) {
              if (err) return done(err);
              if (code == null || code === token.text) {
                return --pending || done();
              }
              token.text = code;
              token.escaped = true;
              --pending || done();
            });
          })(tokens[i]);
        }
    
        return;
      }
      try {
        if (opt) opt = merge({}, marked.defaults, opt);
        return Parser.parse(Lexer.lex(src, opt), opt);
      } catch (e) {
        e.message += '\nPlease report this to https://github.com/chjj/marked.';
        if ((opt || marked.defaults).silent) {
          return '<p>An error occured:</p><pre>'
            + escape(e.message + '', true)
            + '</pre>';
        }
        throw e; !!!!!!
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions