fix: description line break preservation
This commit is contained in:
@@ -931,9 +931,8 @@ defmodule ComponentsElixirWeb.ComponentsLive do
|
||||
<%= if component.description do %>
|
||||
<div>
|
||||
<h4 class="text-sm font-medium text-base-content mb-2">Description</h4>
|
||||
<p class="text-sm text-base-content/70 leading-relaxed">
|
||||
{component.description}
|
||||
</p>
|
||||
<%!-- Keep interpolation inline to prevent whitespace-pre-wrap from preserving template indentation --%>
|
||||
<p class="text-sm text-base-content/70 leading-relaxed whitespace-pre-wrap">{component.description}</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1082,9 +1081,8 @@ defmodule ComponentsElixirWeb.ComponentsLive do
|
||||
<!-- Middle row: Description -->
|
||||
<%= if component.description do %>
|
||||
<div class="mt-1">
|
||||
<p class="text-sm text-base-content/70 line-clamp-2">
|
||||
{component.description}
|
||||
</p>
|
||||
<%!-- Keep interpolation inline to prevent whitespace-pre-wrap from preserving template indentation --%>
|
||||
<p class="text-sm text-base-content/70 line-clamp-2 whitespace-pre-wrap">{component.description}</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user