fixing trailing whitespace on the final line
This commit is contained in:
parent
391135b1a5
commit
61b011cc28
|
@ -39,7 +39,7 @@
|
||||||
// unless explicitly asked not to.
|
// unless explicitly asked not to.
|
||||||
Lexer.prototype.tokenize = function tokenize(code, options) {
|
Lexer.prototype.tokenize = function tokenize(code, options) {
|
||||||
var o;
|
var o;
|
||||||
code = code.replace(/\r/g, '');
|
code = code.replace(/(\r|\s+$)/g, '');
|
||||||
o = options || {};
|
o = options || {};
|
||||||
this.code = code;
|
this.code = code;
|
||||||
// The remainder of the source code.
|
// The remainder of the source code.
|
||||||
|
|
|
@ -43,7 +43,7 @@ exports.Lexer: class Lexer
|
||||||
# Before returning the token stream, run it through the [Rewriter](rewriter.html)
|
# Before returning the token stream, run it through the [Rewriter](rewriter.html)
|
||||||
# unless explicitly asked not to.
|
# unless explicitly asked not to.
|
||||||
tokenize: (code, options) ->
|
tokenize: (code, options) ->
|
||||||
code : code.replace(/\r/g, '')
|
code : code.replace(/(\r|\s+$)/g, '')
|
||||||
o : options or {}
|
o : options or {}
|
||||||
@code : code # The remainder of the source code.
|
@code : code # The remainder of the source code.
|
||||||
@i : 0 # Current character position we're parsing.
|
@i : 0 # Current character position we're parsing.
|
||||||
|
|
Loading…
Reference in New Issue