diff options
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r-- | app/lib/formatter.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index bf99701b7..dec60a3ea 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -76,6 +76,7 @@ class Formatter end html = format_article_content(summary, html) if options[:article_content] && summary.present? + html = format_article_summary(html, status) if !options[:article_content] && summary.present? html.html_safe # rubocop:disable Rails/OutputSafety end @@ -89,6 +90,11 @@ class Formatter text.html_safe # rubocop:disable Rails/OutputSafety end + def format_article_summary(html, status) + status_url = ActivityPub::TagManager.instance.url_for(status) + "#{html}\n<p data-name=\"permalink\"><span>📄 </span>#{link_url(status_url)}</p>" + end + def format_article_content(summary, html) "<blockquote data-name=\"summary\">#{format_summary(summary, html)}</blockquote>#{html}" end |