FIX: Get only the correct collapse title in emails (#10228)

Previously, this would get every details block title from the entire post, for every details block.
This commit is contained in:
Kane York
2020-07-13 18:49:36 -07:00
committed by GitHub
parent 8ddd45d524
commit 919c87a9ce
2 changed files with 24 additions and 1 deletions

View File

@ -33,7 +33,7 @@ after_initialize do
on(:reduce_cooked) do |fragment, post|
fragment.css("details").each do |el|
text = fragment.css("summary").text
text = el.css("summary").text
link = fragment.document.create_element("a")
link["href"] = post.url if post
link.content = I18n.t("details.excerpt_details")