diff --git a/lib/parser.js b/lib/parser.js index c8d7db99..6b94ecae 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -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 ) @@ -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 + "\"" ); }