Permalink
Browse files

Removing extra space

  • Loading branch information...
sburel committed Jan 24, 2015
1 parent 9d6d770 commit b6a2c2e5ae4efbb2e6d5547d296599a76fd8b8e5
Showing with 14 additions and 8 deletions.
  1. +7 −4 lib/square.js
  2. +7 −4 sources/square.ts
View
@@ -37,11 +37,14 @@ var Square;
};
Text.prototype.print = function (stream, carriageReturn) {
var text = this.buffer;
text = text.replace('\n', ' ');
text = text.replace(/\\n/g, '');
text = text.replace(/\\t/g, '');
text = text.replace(/\s+/g, ' ');
stream.write('result += \"');
stream.write(text);
stream.write('\";');
if (text) {
stream.write('result += \"');
stream.write(text);
stream.write('\";');
}
};
return Text;
})();
View
@@ -53,11 +53,14 @@ module Square {
print(stream, carriageReturn) {
var text = this.buffer;
text = text.replace('\n', ' ');
text = text.replace(/\\n/g, '');
text = text.replace(/\\t/g, '');
text = text.replace(/\s+/g, ' ');
stream.write('result += \"')
stream.write(text);
stream.write('\";');
if (text) {
stream.write('result += \"')
stream.write(text);
stream.write('\";');
}
}
}

0 comments on commit b6a2c2e

Please sign in to comment.