From d428c9910e66246c2af46602499acaeaf187d75b Mon Sep 17 00:00:00 2001 From: Di Peng Date: Tue, 14 Jun 2011 17:06:50 -0700 Subject: [PATCH] Replaced double line break with single when text is fetched from Google Docs Closes #384 --- gdocs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdocs.js b/gdocs.js index 4e8048f0a430..3d60756e1e76 100755 --- a/gdocs.js +++ b/gdocs.js @@ -85,6 +85,10 @@ function download(collection, name, url) { data = data + '\n'; + + //this should be a bug in Google Doc API, hence need to remove this once the bug is fixed + data = data.replace(/\n\n/g, '\n'); + fs.writeFileSync('docs/content/' + collection + '/' + name, reflow(data, 100)); } );