Remove ruby DText implementation (#3206).
This commit is contained in:
@@ -49,20 +49,12 @@ module ApplicationHelper
|
||||
raw %{<a href="#{h(url)}" #{attributes}>#{text}</a>}
|
||||
end
|
||||
|
||||
def format_text(text, ragel: true, **options)
|
||||
if ragel
|
||||
raw DTextRagel.parse(text, **options)
|
||||
else
|
||||
DText.parse(text)
|
||||
end
|
||||
def format_text(text, **options)
|
||||
raw DTextRagel.parse(text, **options)
|
||||
end
|
||||
|
||||
def strip_dtext(text, options = {})
|
||||
if options[:ragel]
|
||||
raw(DTextRagel.parse_strip(text))
|
||||
else
|
||||
DText.parse_strip(text)
|
||||
end
|
||||
def strip_dtext(text)
|
||||
raw(DTextRagel.parse_strip(text))
|
||||
end
|
||||
|
||||
def error_messages_for(instance_name)
|
||||
|
||||
@@ -4,7 +4,7 @@ module PostAppealsHelper
|
||||
html << '<ul>'
|
||||
|
||||
post.appeals.each do |appeal|
|
||||
reason = DText.parse_inline(appeal.reason).html_safe
|
||||
reason = format_text(appeal.reason, inline: true)
|
||||
user = link_to_user(appeal.creator)
|
||||
if CurrentUser.is_moderator?
|
||||
ip = "(#{link_to_ip(appeal.creator_ip_addr)})"
|
||||
|
||||
@@ -5,7 +5,7 @@ module PostFlagsHelper
|
||||
|
||||
post.flags.each do |flag|
|
||||
html << '<li>'
|
||||
html << DText.parse_inline(flag.reason).html_safe
|
||||
html << format_text(flag.reason, inline: true)
|
||||
|
||||
if CurrentUser.can_view_flagger?(flag.creator_id)
|
||||
html << " - #{link_to_user(flag.creator)}"
|
||||
|
||||
Reference in New Issue
Block a user