Skip to content

Incorrect indentation of lambdas in array::map and array.forEach #95

@jcubic

Description

@jcubic

This works fine for Ruby mode on the Codemirror website:

arr.each(((lambda {|x|
    puts x
})))

But in Gaimain playground you get this:

let mapping = [
["factorial", "white"],
["interpreter", "red"]
].map(lambda(pair)
        let token = pair[0]
        let color = pair[1]
        pair[0] = new RegExp("(" + token + ")", "gi")
        pair[1] = "[[;$color;]$1]"
        return pair
    end).forEach(lambda (formatter)
        jQuery.terminal.new_formatter(formatter)
    end)

Another issue is an indentation of nested arrays. This also works fine for Ruby mode.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions