mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
fixing extra spaces in nested empty functions. Issue #527
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
starts = _c.starts;
|
||||
compact = _c.compact;
|
||||
exports.Lexer = (function() {
|
||||
Lexer = function() { };
|
||||
Lexer = function() {};
|
||||
Lexer.prototype.tokenize = function(code, options) {
|
||||
var o;
|
||||
code = code.replace(/(\r|\s+$)/g, '');
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
starts = _a.starts;
|
||||
ends = _a.ends;
|
||||
exports.BaseNode = (function() {
|
||||
BaseNode = function() { };
|
||||
BaseNode = function() {};
|
||||
BaseNode.prototype.compile = function(o) {
|
||||
var closure, top;
|
||||
this.options = merge(o || {});
|
||||
@@ -984,7 +984,7 @@
|
||||
(o.scope.parameter(param));
|
||||
}
|
||||
code = this.body.expressions.length ? ("\n" + (this.body.compileWithDeclarations(o)) + "\n") : '';
|
||||
func = ("function(" + (params.join(', ')) + ") {" + code + (this.idt(this.bound ? 1 : 0)) + "}");
|
||||
func = ("function(" + (params.join(', ')) + ") {" + code + (code && this.idt(this.bound ? 1 : 0)) + "}");
|
||||
if (top && !this.bound) {
|
||||
func = ("(" + func + ")");
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
_b = helpers;
|
||||
include = _b.include;
|
||||
exports.Rewriter = (function() {
|
||||
Rewriter = function() { };
|
||||
Rewriter = function() {};
|
||||
Rewriter.prototype.rewrite = function(tokens) {
|
||||
this.tokens = tokens;
|
||||
this.adjustComments();
|
||||
|
||||
Reference in New Issue
Block a user