diff --git a/lib/coffeescript/lexer.js b/lib/coffeescript/lexer.js index 01dcd28753..200cdee33b 100644 --- a/lib/coffeescript/lexer.js +++ b/lib/coffeescript/lexer.js @@ -465,7 +465,7 @@ return indent.length; } if (size > this.indent) { - if (noNewlines) { + if (noNewlines || this.tag() === 'RETURN') { this.indebt = size - this.indent; this.suppressNewlines(); return indent.length; diff --git a/src/lexer.coffee b/src/lexer.coffee index 33247b2aeb..6a61c28bec 100644 --- a/src/lexer.coffee +++ b/src/lexer.coffee @@ -403,7 +403,7 @@ exports.Lexer = class Lexer return indent.length if size > @indent - if noNewlines + if noNewlines or @tag() is 'RETURN' @indebt = size - @indent @suppressNewlines() return indent.length