<% if @commentable.respond_to?(:main_image) && @commentable.main_image.present? %>
<% end %>
<%= @commentable.title %>
<%= t("views.comments.parent.metadata_html",
name: @commentable.is_a?(PodcastEpisode) ? @commentable.podcast.name : @commentable.user.name,
on: tag.span(@commentable.published_at ? t("views.comments.parent.date", date: @commentable.published_at.strftime(t("time.formats.comment"))) : "", class: %w[published-at])) %>
<% if @commentable.processed_html.present? %>
<% if @commentable.processed_html.size < 350 %>
<%= sanitize_rendered_markdown(@commentable.processed_html) %>
<% else %>
<%= truncate(sanitize(@commentable.processed_html, tags: []), length: 150) %>
<% end %>
<% else %>
<%= javascript_include_tag "commentsDisplay", defer: true %>
<% if @commentable %>
<%= t("views.comments.parent.subtitle_html",
start: tag("span", { class: %w[fw-normal color-base-60] }, true),
end: "".html_safe,
title: tag.span(@commentable.title)) %>
<% else %>
<%= t("views.comments.orphan.deleted") %>
<% end %>
<% end %>
<% if @root_comment.present? && (@root_comment.depth > 0 && parent = @root_comment.parent) %>
<% end %>
<%= render "articles/conduct_and_abuse_actions", page: "comments_index" %>
<% if @commentable && has_vid?(@commentable) %>
<%= render "articles/fitvids" %>
<% end %>