Skip to content

fix: options is optional - #260

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

fix: options is optional#260
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

Copy link
Copy Markdown

minimal failure case

varinput,marked,sync;marked=require('marked');input="# header\n+ item\n+ another item";marked(input,function(){returnconsole.log(arguments);});

@joshbrucejoshbruce added this to the 0.4.0 - No known defects milestone Dec 26, 2017
Comment threadlib/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

@joshbrucejoshbruce 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.

Sign up for freeto 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.

5 participants

@supersheep@hayeah@joshbruce@UziTech@styfle