From ffab5217f45198aae7dd800e6c360b24774402e1 Mon Sep 17 00:00:00 2001 From: YoheiZuho Date: Mon, 16 May 2022 12:54:21 +0900 Subject: [PATCH] test --- app/lib/text_formatter.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/lib/text_formatter.rb b/app/lib/text_formatter.rb index f9684c334..bf513be23 100644 --- a/app/lib/text_formatter.rb +++ b/app/lib/text_formatter.rb @@ -43,7 +43,7 @@ class TextFormatter end end - html += render_quote if quote? + html += quotify if quote? html = simple_format(html, {}, sanitize: false).delete("\n") if multiline? @@ -128,10 +128,11 @@ class TextFormatter HTML end - def render_quote - link = link_to_url({ url: ap_tag_manager.url_for(quote) }) + def quotify + url = ActivityPub::TagManager.instance.url_for(status.quote) + link = encode_and_link_urls(url) <<~HTML.squish -
~~~~~~~~~~
[#{link}]
+
QT: #{link}
" HTML end