diff --git a/lib/parser.js b/lib/parser.js index c5f2448..d5e51f7 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -388,7 +388,8 @@ Parser.prototype._findBlocks = function() { var regexForFile = this.languages[self.extension] || this.languages['default']; var matches = regexForFile.docBlocksRegExp.exec(src); while (matches) { - var block = matches[2] || matches[1]; + matches.shift(); // Drop the 0th element which is the full string + var block = _.compact(matches)[0]; // Drop nulls and use first actual match // Reverse Unicode Linebreaks block = block.replace(/\uffff/g, '\n'); diff --git a/package.json b/package.json index 92e7c00..11dda1e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "apidoc-core", - "version": "0.8.3", + "version": "0.8.4", "description": "Core parser library to generate apidoc result following the apidoc-spec", "author": "Peter Rottmann ", "license": "MIT",