This commit is contained in:
YoheiZuho 2022-05-16 12:56:23 +09:00
parent ffab5217f4
commit ecb99b433e
2 changed files with 6 additions and 13 deletions

View File

@ -10,11 +10,12 @@ class QuoteFormatter
end
def to_s
return html if status.quote? && !options[:escape_quotify]
url = ActivityPub::TagManager.instance.url_for(status.quote)
link = encode_and_link_urls(url)
html.sub(/(<[^>]+>)\z/, "<span class=\"quote-inline\"><br/>QT: #{link}</span>\\1")
def render_quote
link = link_to_url({ url: ap_tag_manager.url_for(quote) })
<<~HTML.squish
<span class="quote-inline"><br/>~~~~~~~~~~<br/>[#{link}]</span>
HTML
end
end
def format_in_quote(status, **options)

View File

@ -128,14 +128,6 @@ class TextFormatter
HTML
end
def quotify
url = ActivityPub::TagManager.instance.url_for(status.quote)
link = encode_and_link_urls(url)
<<~HTML.squish
<span class="quote-inline"><br/>QT: #{link}</span>"
HTML
end
def entity_cache
@entity_cache ||= EntityCache.instance
end