enable ragel parser for artist commentaries
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<section id="original-artist-commentary">
|
||||
<h3><%= artist_commentary.original_title %></h3>
|
||||
<div class="prose">
|
||||
<%= format_text(artist_commentary.original_description) %>
|
||||
<%= format_text(artist_commentary.original_description, :ragel => true) %>
|
||||
</div>
|
||||
</section>
|
||||
<% end %>
|
||||
@@ -31,7 +31,7 @@
|
||||
</h3>
|
||||
<div class="prose">
|
||||
<% if artist_commentary.translated_description.present? %>
|
||||
<%= format_text(artist_commentary.translated_description) %>
|
||||
<%= format_text(artist_commentary.translated_description, :ragel => true) %>
|
||||
<% else %>
|
||||
<span class="disabled"><%= format_text(artist_commentary.original_description) %></span>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user