aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVojta Jina2011-06-07 22:21:01 +0200
committerIgor Minar2011-06-07 14:56:56 -0700
commite670a812fa85dd6a63b0d128815f9c0682ffd177 (patch)
treea551e93c33d98369bad3a1eb2606d61e8c0761d0
parent517ada2662019aae99af4bffb0e7fc673bbe9ebd (diff)
downloadangular.js-e670a812fa85dd6a63b0d128815f9c0682ffd177.tar.bz2
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
-rw-r--r--docs/src/reader.js21
-rwxr-xr-xgdocs.js6
2 files changed, 1 insertions, 26 deletions
diff --git a/docs/src/reader.js b/docs/src/reader.js
index 188d3fd3..7342e6df 100644
--- a/docs/src/reader.js
+++ b/docs/src/reader.js
@@ -48,26 +48,7 @@ function findNgDocInDir(directory, docNotify) {
fs.readFile(directory + '/' + file, docNotify.waitFor(function(err, content){
if (err) return this.error(err);
var section = '@section ' + directory.split('/').pop() + '\n';
-
- //TEMPORARY FIX to strip stuff from the docs until gdocs api is fixed
- var text = content.toString();
-
- text = text.replace('\ufeff', '');
- text = text.replace(/\r\n/mg, '\n');
- text = text.replace(/^ /mg, ' '); //for some reason gdocs drop first space for indented lines
-
- // strip out all text annotation comments
- text = text.replace(/^\[a\][\S\s]*/m, '');
-
- // strip out all text annotations
- text = text.replace(/\[\w{1,3}\]/mg, '');
-
- // fix smart-quotes
- text = text.replace(/[“”]/g, '"');
- text = text.replace(/[‘’]/g, "'");
- //TEMPORARY FIX END
-
- docNotify(section + text, directory + '/' +file, 1);
+ docNotify(section + content.toString(), directory + '/' +file, 1);
}));
} else if(stats.isDirectory()) {
findNgDocInDir(directory + '/' + file, docNotify.waitFor(docNotify));
diff --git a/gdocs.js b/gdocs.js
index e5c13b9e..662fb12b 100755
--- a/gdocs.js
+++ b/gdocs.js
@@ -73,12 +73,6 @@ function download(collection, name, url) {
data = data.replace('\ufeff', '');
data = data.replace(/\r\n/mg, '\n');
- // strip out all text annotation comments
- data = data.replace(/^\[a\][\S\s]*/m, '');
-
- // strip out all text annotations
- data = data.replace(/\[\w{1,3}\]/mg, '');
-
// strip out all docos comments
data = data.replace(/^[^\s_]+:\n\S+[\S\s]*$/m, '')