Skip to content

Formatter: Fix Bug where case children were lost#756

Merged
marcoroth merged 1 commit intomainfrom
fix-erb-case-children-formatting
Oct 31, 2025
Merged

Formatter: Fix Bug where case children were lost#756
marcoroth merged 1 commit intomainfrom
fix-erb-case-children-formatting

Conversation

@marcoroth
Copy link
Owner

@marcoroth marcoroth commented Oct 31, 2025

This pull request fixes a bug in the formatter where it would drop the children of case/when and case/in statements.

<% case variable %>
  <h1>Children</h1>
<% else %>
  <h1>else</h1>
<% end %>

was formatted as:

<% case variable %>
<% else %>
  <h1>else</h1>
<% end %>

Now they are being preserved:

<% case variable %>
  <h1>Children</h1>
<% else %>
  <h1>else</h1>
<% end %>

@marcoroth marcoroth added the bug Something isn't working label Oct 31, 2025
@marcoroth marcoroth merged commit 0917444 into main Oct 31, 2025
9 checks passed
@marcoroth marcoroth deleted the fix-erb-case-children-formatting branch October 31, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant