Fix quote inline not hidden on WebUI
This commit is contained in:
parent
ac517abef2
commit
bef7f9a21c
@ -33,8 +33,7 @@ class TextFormatter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
append_quote if quote?
|
return ''.html_safe if text.blank? & !quote?
|
||||||
return ''.html_safe if text.blank?
|
|
||||||
|
|
||||||
html = rewrite do |entity|
|
html = rewrite do |entity|
|
||||||
if entity[:url]
|
if entity[:url]
|
||||||
@ -46,6 +45,8 @@ class TextFormatter
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
html += render_quote if quote?
|
||||||
|
|
||||||
html = simple_format(html, {}, sanitize: false).delete("\n") if multiline?
|
html = simple_format(html, {}, sanitize: false).delete("\n") if multiline?
|
||||||
|
|
||||||
html.html_safe # rubocop:disable Rails/OutputSafety
|
html.html_safe # rubocop:disable Rails/OutputSafety
|
||||||
@ -129,8 +130,11 @@ class TextFormatter
|
|||||||
HTML
|
HTML
|
||||||
end
|
end
|
||||||
|
|
||||||
def append_quote
|
def render_quote
|
||||||
@text += "\n[#{ap_tag_manager.url_for(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 entity_cache
|
def entity_cache
|
||||||
|
Loading…
Reference in New Issue
Block a user