镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix: options is optional - #260

Closed
supersheep wants to merge 1 commit into
markedjs:masterfrom
supersheep:master
Closed

supersheep wants to merge 1 commit into
markedjs:masterfrom
supersheep:master

Conversation

@supersheep

Copy link
Copy Markdown

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

hayeah commented Oct 22, 2013

Copy link
Copy Markdown

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
Comment thread lib/marked.js
opt = marked.defaults;
}

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

Copy link
Copy Markdown
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
Copy Markdown
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