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

Commit

Permalink
fix(ngdocs): pass options to js file too fix #54
Browse files Browse the repository at this point in the history
  • Loading branch information
m7r committed Jan 9, 2014
1 parent 6c16ca4 commit 97f00b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var ngdoc = require('./ngdoc.js'),

function process(content, file, section, options) {
if (/\.js$/.test(file)) {
processJsFile(content, file, section).forEach(function(doc) {
processJsFile(content, file, section, options).forEach(function(doc) {
exports.docs.push(doc);
});
} else if (file.match(/\.ngdoc$/)) {
Expand All @@ -19,7 +19,7 @@ function process(content, file, section, options) {
}
}

function processJsFile(content, file, section) {
function processJsFile(content, file, section, options) {
var docs = [];
var lines = content.toString().split(NEW_LINE);
var text;
Expand All @@ -42,7 +42,7 @@ function processJsFile(content, file, section) {
text = text.replace(/^\n/, '');
if (text.match(/@ngdoc/)){
//console.log(file, startingLine)
docs.push(new ngdoc.Doc('@section ' + section + '\n' + text, file, startingLine).parse());
docs.push(new ngdoc.Doc('@section ' + section + '\n' + text, file, startingLine, options).parse());
}
doc = null;
inDoc = false;
Expand Down

0 comments on commit 97f00b9

Please sign in to comment.