diff options
| author | Pete Bacon Darwin | 2013-06-25 21:17:36 +0100 | 
|---|---|---|
| committer | Pete Bacon Darwin | 2013-06-25 21:17:36 +0100 | 
| commit | 73f811203200ec96b7a396151327089c39fe37a3 (patch) | |
| tree | 0202126d4b5a4fad0eba3194c07b847dbf11aba4 /docs/src | |
| parent | 71bc1b761d9721805caab9479287b34169c0121e (diff) | |
| download | angular.js-73f811203200ec96b7a396151327089c39fe37a3.tar.bz2 | |
fix(doc-gen): correctly transform index files
Closes #3021
Diffstat (limited to 'docs/src')
| -rw-r--r-- | docs/src/writer.js | 8 | 
1 files changed, 7 insertions, 1 deletions
| diff --git a/docs/src/writer.js b/docs/src/writer.js index c9089be0..cdfa12d6 100644 --- a/docs/src/writer.js +++ b/docs/src/writer.js @@ -51,13 +51,19 @@ exports.copyTemplate = function(filename) {   * @param  transform{function=} transfromation function to be applied before return   */  exports.copy = function(from, to, transform) { +  var transformArgs = Array.prototype.slice.call(arguments, 3); +    from = pathUtils.normalize(from);    to = pathUtils.normalize(to);    // We have to use binary reading, Since some characters are unicode.    return qfs.read(from, 'b').then(function(content) {      if (transform) { -      content = transform.call(null, content.toString(), from, to, transform); +      // Pass any extra arguments, e.g. +      // `copy(from, to, transform, extra1, extra2, ...)` +      // to the transform function +      transformArgs.unshift(content.toString()); +      content = transform.apply(null, transformArgs);      }      return output(to, content);    }); | 
