enable ragel parser for artist commentaries

This commit is contained in:
r888888888
2016-06-20 14:13:20 -07:00
parent 8cf893757e
commit 41ee2de3d6
3 changed files with 21 additions and 19 deletions

View File

@@ -50,7 +50,7 @@ module ApplicationHelper
end
def format_text(text, options = {})
if !CurrentUser.is_anonymous? && CurrentUser.id < 0
if options[:ragel]
raw(DTextRagel.parse(text))
else
DText.parse(text)
@@ -58,7 +58,7 @@ module ApplicationHelper
end
def strip_dtext(text, options = {})
if !CurrentUser.is_anonymous? && CurrentUser.id < 0
if options[:ragel]
raw(DTextRagel.parse_strip(text))
else
DText.parse_strip(text)