mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
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
This commit is contained in:
parent
15efbbdc1f
commit
4f6e947e49
2 changed files with 3 additions and 3 deletions
|
|
@ -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());
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue