Skip to content

Conversation

supersheep
Copy link

when opt is not passed, opt should be default options, or an error will be raised when accessing opt.highlight.

Sorry for not adding testcase, I don't know how, wish to see mocha or other testsuit in the future :)

@hayeah
Copy link

hayeah commented Oct 22, 2013

minimal failure case

var input, marked, sync;

  marked = require('marked');

  input = "# header\n+ item\n+ another item";

  marked(input, function() {
    return console.log(arguments);
  });

@joshbruce joshbruce added this to the 0.4.0 - No known defects milestone Dec 26, 2017
@@ -1040,7 +1040,7 @@ function marked(src, opt, callback) {
if (callback || typeof opt === 'function') {
if (!callback) {
callback = opt;
opt = null;
opt = marked.defaults;
}

opt = merge({}, marked.defaults, opt || {});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opt is getting set as marked.defaults here

@joshbruce joshbruce removed this from the 0.4.0 - No known defects milestone Apr 4, 2018
@joshbruce
Copy link
Member

Closing. See #1203. Tagging @UziTech just in case I'm wrong here.

@joshbruce joshbruce closed this Apr 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants