From 97f00b920d7c982e301da4fa199b669197dacc64 Mon Sep 17 00:00:00 2001 From: m7r Date: Thu, 9 Jan 2014 13:04:12 +0100 Subject: [PATCH] fix(ngdocs): pass options to js file too fix #54 --- src/reader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/reader.js b/src/reader.js index be8a130..89b3696 100644 --- a/src/reader.js +++ b/src/reader.js @@ -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$/)) { @@ -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; @@ -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;