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

special case for guard pattern match syntax if ... end => ... #789

Open
Roger-luo opened this issue Dec 6, 2023 · 1 comment
Open

special case for guard pattern match syntax if ... end => ... #789

Roger-luo opened this issue Dec 6, 2023 · 1 comment

Comments

@Roger-luo
Copy link

This is related to #404, consider the following code

@match node begin
    if is_leaf(node) end => nothing
end

currently this will format it into

@match node begin
    if is_leaf(node)
    end => nothing
end

I'm wondering if we can special case this?

@domluna
Copy link
Owner

domluna commented Dec 6, 2023

we probably could. right now the we just split it no matter what but we could add an option where we consider the margin.

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

No branches or pull requests

2 participants