Skip to content
This repository has been archived by the owner on Jan 23, 2022. It is now read-only.

Commit

Permalink
feat(ngdocs): parse all given files #58 #71
Browse files Browse the repository at this point in the history
  • Loading branch information
m7r committed Oct 27, 2014
1 parent 8363c97 commit 793d797
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ var ngdoc = require('./ngdoc.js'),
NEW_LINE = /\n\r?/;

function process(content, file, section, options) {
if (/\.js$/.test(file)) {
if (file.match(/\.ngdoc$/)) {
var header = '@section ' + section + '\n';
exports.docs.push(new ngdoc.Doc(header + content.toString(),file, 1, options).parse());
} else {
processJsFile(content, file, section, options).forEach(function(doc) {
exports.docs.push(doc);
});
} else if (file.match(/\.ngdoc$/)) {
var header = '@section ' + section + '\n';
exports.docs.push(new ngdoc.Doc(header + content.toString(),file, 1, options).parse());
}
}

Expand Down

0 comments on commit 793d797

Please sign in to comment.