Skip to content

Commit e670a81

Browse files
vojtajinaIgorMinar
authored andcommitted
Remove removing old comments from gdocs
There were two places where we were removing old comments from google docs: * gdocs.js fetching script * docs/src/reader.js
1 parent 517ada2 commit e670a81

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

docs/src/reader.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,7 @@ function findNgDocInDir(directory, docNotify) {
4848
fs.readFile(directory + '/' + file, docNotify.waitFor(function(err, content){
4949
if (err) return this.error(err);
5050
var section = '@section ' + directory.split('/').pop() + '\n';
51-
52-
//TEMPORARY FIX to strip stuff from the docs until gdocs api is fixed
53-
var text = content.toString();
54-
55-
text = text.replace('\ufeff', '');
56-
text = text.replace(/\r\n/mg, '\n');
57-
text = text.replace(/^ /mg, ' '); //for some reason gdocs drop first space for indented lines
58-
59-
// strip out all text annotation comments
60-
text = text.replace(/^\[a\][\S\s]*/m, '');
61-
62-
// strip out all text annotations
63-
text = text.replace(/\[\w{1,3}\]/mg, '');
64-
65-
// fix smart-quotes
66-
text = text.replace(/[]/g, '"');
67-
text = text.replace(/[]/g, "'");
68-
//TEMPORARY FIX END
69-
70-
docNotify(section + text, directory + '/' +file, 1);
51+
docNotify(section + content.toString(), directory + '/' +file, 1);
7152
}));
7253
} else if(stats.isDirectory()) {
7354
findNgDocInDir(directory + '/' + file, docNotify.waitFor(docNotify));

gdocs.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,6 @@ function download(collection, name, url) {
7373
data = data.replace('\ufeff', '');
7474
data = data.replace(/\r\n/mg, '\n');
7575

76-
// strip out all text annotation comments
77-
data = data.replace(/^\[a\][\S\s]*/m, '');
78-
79-
// strip out all text annotations
80-
data = data.replace(/\[\w{1,3}\]/mg, '');
81-
8276
// strip out all docos comments
8377
data = data.replace(/^[^\s_]+:\n\S+[\S\s]*$/m, '')
8478

0 commit comments

Comments
 (0)