nebulab / erb-formatter

Format ERB files with speed and precision
MIT License
135 stars 22 forks source link

Run code in else block if ruby tag is standalone #53

Closed IbraheemTuffaha closed 2 months ago

IbraheemTuffaha commented 2 months ago

This fixes the bug described in this issue https://github.com/nebulab/erb-formatter/issues/51 opened by @AliOsm The problem is that some tags are standalone, with no body or end tags Like yield and next statements This PR runs the same code written in the else block of the switch statement if the tags are standalone

IbraheemTuffaha commented 2 months ago

@elia

elia commented 2 months ago

@IbraheemTuffaha thanks for fixing this! I added some fixtures to avoid regressions.