mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-14 17:27:59 -05:00
getting the whole codebase passing jslint again.
This commit is contained in:
@@ -304,7 +304,7 @@ exports.Lexer = class Lexer
|
||||
# Sanitize a heredoc or herecomment by escaping internal double quotes and
|
||||
# erasing all external indentation on the left-hand side.
|
||||
sanitizeHeredoc: (doc, options) ->
|
||||
while match = HEREDOC_INDENT.exec doc
|
||||
while (match = HEREDOC_INDENT.exec(doc))
|
||||
attempt = if match[2]? then match[2] else match[3]
|
||||
indent = attempt if not indent or attempt.length < indent.length
|
||||
doc = doc.replace(new RegExp("^" +indent, 'gm'), '')
|
||||
|
||||
@@ -577,7 +577,7 @@ exports.RangeNode = class RangeNode extends BaseNode
|
||||
else
|
||||
clause = "#@fromVar <= #@toVar ?"
|
||||
body = "var #i = #@fromVar; #clause #i <#@equals #@toVar : #i >#@equals #@toVar; #clause #i += 1 : #i -= 1"
|
||||
post = "{ #{result}.push(#i) };\n#{idt}return #result;\n#o.indent"
|
||||
post = "{ #{result}.push(#i); }\n#{idt}return #result;\n#o.indent"
|
||||
"(function() {#{pre}\n#{idt}for (#body)#post}).call(this)"
|
||||
|
||||
#### SliceNode
|
||||
|
||||
Reference in New Issue
Block a user