Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jcubic opened this issue Dec 27, 2023 · 0 comments
Open

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

jcubic opened this issue Dec 27, 2023 · 0 comments

Comments

@jcubic
Copy link
Owner

jcubic commented Dec 27, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant