aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/reader.js
diff options
context:
space:
mode:
authorDiPeng2011-08-01 08:42:32 -0700
committerIgor Minar2011-08-18 23:33:10 -0700
commit2f5d17f3b6b8732894e576b7be4270dcad8fa343 (patch)
tree13e8877a1b8a220f4e3b743186967841fa61ddcb /docs/src/reader.js
parentfd792de9e87e54f1efc93cccd514d2637b3eb7fc (diff)
downloadangular.js-2f5d17f3b6b8732894e576b7be4270dcad8fa343.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/reader.js')
-rw-r--r--docs/src/reader.js4
1 files changed, 2 insertions, 2 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());
});