mirror of
https://github.com/ubicloud/ubicloud.git
synced 2025-10-07 23:31:58 +08:00
Currently, herb/formatter has at least 4 bugs the prevent us from switching to it (https://github.com/marcoroth/herb/issues 476, 477, 478, and 479). This includes manual fixes for each issue. herb/formatter also introduces a rubocop violation for the Layout/AssignmentIndentation cop. This disables that cop.
20 lines
518 B
Text
20 lines
518 B
Text
<%# locals: (content:, opts: nil) %>
|
|
|
|
<% opts ||= {} %>
|
|
|
|
<% if opts[:copyable] && content %>
|
|
<%== part("components/copyable_content", content:, revealable: opts[:revealable]) %>
|
|
<% elsif opts[:link] %>
|
|
<a
|
|
href="<%= opts[:link] %>"
|
|
class="font-medium text-orange-600 hover:text-orange-700"
|
|
>
|
|
<%= content %>
|
|
</a>
|
|
<% elsif opts[:component] %>
|
|
<%== part("components/#{content}", **opts[:component]) %>
|
|
<% elsif opts[:escape] == false %>
|
|
<%== content %>
|
|
<% else %>
|
|
<%= content || "-" %>
|
|
<% end %>
|