diff options
| author | DiPeng | 2011-08-01 08:42:32 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-08-03 16:50:25 -0700 | 
| commit | 4f6e947e494c2c574b02cfb87b9b9bba29148737 (patch) | |
| tree | fa6ec85dab8d9c9b2ef04c0e8c243974777593d5 /docs/src | |
| parent | 15efbbdc1fe42f914e6442b32ffc032a4cc8e792 (diff) | |
| download | angular.js-4f6e947e494c2c574b02cfb87b9b9bba29148737.tar.bz2 | |
fix(docs): fix qfs.read() encoding issue
- must use binary reading when using read function in q-fs module
otherwise some unicode character may be garbled.
Closes #497
Diffstat (limited to 'docs/src')
| -rw-r--r-- | docs/src/reader.js | 4 | ||||
| -rw-r--r-- | docs/src/writer.js | 2 | 
2 files changed, 3 insertions, 3 deletions
| diff --git a/docs/src/reader.js b/docs/src/reader.js index 8ea59af9..9b846ed4 100644 --- a/docs/src/reader.js +++ b/docs/src/reader.js @@ -24,7 +24,7 @@ function collect() {        var work;        if(/\.js$/.test(file)) {          console.log("reading " + file + "......."); -        work = Q.when(qfs.read(file), function(content) { +        work = Q.when(qfs.read(file, 'b'), function(content) {            processJsFile(content, file).forEach (function(doc) {              allDocs.push(doc);            }); @@ -45,7 +45,7 @@ function collect() {         var work2;         if (file.match(/\.ngdoc$/)) {           console.log("reading " + file + "......."); -         work2 = Q.when(qfs.read(file), function(content){ +         work2 = Q.when(qfs.read(file, 'b'), function(content){              var section = '@section ' + file.split('/')[2] + '\n';              allDocs.push(new ngdoc.Doc(section + content.toString(),file, 1).parse());            }); diff --git a/docs/src/writer.js b/docs/src/writer.js index 1acf9df7..b33e4164 100644 --- a/docs/src/writer.js +++ b/docs/src/writer.js @@ -83,7 +83,7 @@ function merge(srcs, to) {    srcs.forEach(function (src) {      done = Q.when(done, function(content) {        if(content) contents.push(content); -      return qfs.read(src); +      return qfs.read(src, 'b');      });    }); | 
