Skip to content

Commit 2f5d17f

Browse files
DiPengIgorMinar
authored andcommitted
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 angular#497
1 parent fd792de commit 2f5d17f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/src/reader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function collect() {
2424
var work;
2525
if(/\.js$/.test(file)) {
2626
console.log("reading " + file + ".......");
27-
work = Q.when(qfs.read(file), function(content) {
27+
work = Q.when(qfs.read(file, 'b'), function(content) {
2828
processJsFile(content, file).forEach (function(doc) {
2929
allDocs.push(doc);
3030
});
@@ -45,7 +45,7 @@ function collect() {
4545
var work2;
4646
if (file.match(/\.ngdoc$/)) {
4747
console.log("reading " + file + ".......");
48-
work2 = Q.when(qfs.read(file), function(content){
48+
work2 = Q.when(qfs.read(file, 'b'), function(content){
4949
var section = '@section ' + file.split('/')[2] + '\n';
5050
allDocs.push(new ngdoc.Doc(section + content.toString(),file, 1).parse());
5151
});

docs/src/writer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function merge(srcs, to) {
8383
srcs.forEach(function (src) {
8484
done = Q.when(done, function(content) {
8585
if(content) contents.push(content);
86-
return qfs.read(src);
86+
return qfs.read(src, 'b');
8787
});
8888
});
8989

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy