Skip to content

Commit

Permalink
Bugfix: Markdown error on Empty description.
Browse files Browse the repository at this point in the history
  • Loading branch information
rottmann committed Nov 7, 2014
1 parent 79294d0 commit 906010a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ Parser.prototype._parseBlockElements = function(indexApiBlocks, detectedElements

// Markdown
// TODO: Evaluate if better add a function in specific worker_{name}.js
if(app.options.marked.gfm &&
if( result &&
app.options.marked.gfm &&
self.parsers[element.name].markdownFields &&
self.parsers[element.name].markdownFields.length > 0
)
Expand All @@ -164,14 +165,14 @@ Parser.prototype._parseBlockElements = function(indexApiBlocks, detectedElements
catch(e)
{
throw new Error("\"@" + element.sourceName + "\" in file \"" + self.filename +
"\" block number " + (blockIndex + 1) + " " + e
"\" block number " + (blockIndex + 1) + ", source \"" + element.source + "\" " + e
);
}

if( ! result)
{
throw new Error("Empty result for \"@" + element.sourceName + "\" in file \"" + self.filename +
"\" block number " + (blockIndex + 1) + "."
throw new Error("Empty parser result for \"@" + element.sourceName + "\" in file \"" + self.filename +
"\" block number " + (blockIndex + 1) + ", source \"" + element.source + "\""
);
}

Expand Down

0 comments on commit 906010a

Please sign in to comment.