nebulab / erb-formatter

Format ERB files with speed and precision
MIT License
142 stars 24 forks source link

Removes the loop #11

Closed albertorestifo closed 1 year ago

albertorestifo commented 1 year ago

Formatting the following:

<!DOCTYPE html>
<html class="h-full bg-gray-100">
  <head>
    <title>Paragliding</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>
    <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>

    <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
    <%= stylesheet_link_tag "https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css",
    "data-turbo-track": "reload" %>
    <%= javascript_importmap_tags %>
  </head>

  <body class="h-full">
    <% flash.each do |type, data| %>
      <%= render AlertComponent.new(type: type, data: data) %>
    <% end %>

    <%= render NavbarComponent.new %>

    <main class="mx-auto max-w-7xl pb-10 lg:py-12 lg:px-8">
      <%= yield %>
    </main>
  </body>
</html>

Removes the loop for the flash messages.

elia commented 1 year ago

@albertorestifo couldn't replicate it on master, which version was affected?

albertorestifo commented 1 year ago

I can't reproduce it anymore 🤷