don't set the github repo's nameWithOwner if the config is incomplete

This commit is contained in:
Jeff Williams 2012-10-18 14:01:46 -07:00
parent 4ad4dde687
commit 409c62b22c

View File

@ -33,10 +33,14 @@ function getParser(parser, conf) {
if (parser === parsers.gfm) {
parser = require(parser);
var githubConf = {
nameWithOwner: conf.githubRepoOwner + "/" + conf.githubRepoName,
repoName: conf.githubRepoName
};
if (conf.githubRepoOwner && conf.githubRepoName) {
githubConf.nameWithOwner = conf.githubRepoOwner + "/" + conf.githubRepoName;
}
parser.hardwrap = !!conf.hardwrap;
return function(source) {