Skip to content

Commit a4be8c3

Browse files
authored
Merge pull request #90 from substancelab/validation
Verify ERB files with herb analyze
2 parents 5c46b9c + cdeb96e commit a4be8c3

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/erb.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,15 @@ jobs:
1717
ruby-version: ['3.4']
1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: herb
20+
21+
- name: Set up Ruby
22+
uses: ruby/setup-ruby@v1
23+
with:
24+
ruby-version: ${{ matrix.ruby-version }}
25+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
26+
27+
- name: herb linter
2128
run: npx @herb-tools/linter app/components --no-color
29+
30+
- name: herb analyzer
31+
run: bundle exec herb analyze app/components

app/components/flowbite/toast/toast.html.erb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<div
2-
class="<%= container_classes.join(" ") %>"
3-
role="alert"
4-
<%= options.map { |k, v| "#{k}=\"#{v}\"" }.join(" ").html_safe %>
5-
>
1+
<%= tag.div(
2+
class: container_classes.join(" "),
3+
role: "alert",
4+
**options,
5+
) do %>
66
<%= render Flowbite::Toast::Icon.new(style: style) %>
77

88
<div class="ms-3 text-sm font-normal"><%= message %></div>
@@ -37,4 +37,4 @@
3737
</svg>
3838
</button>
3939
<% end %>
40-
</div>
40+
<% end %>

0 commit comments

Comments
 (0)