Process descriptions with markdown

This commit is contained in:
Marcin Kulik 2012-03-11 14:38:37 +01:00
parent 60d32ca2d3
commit 0ea7e6dbb0
2 changed files with 3 additions and 2 deletions

View File

@ -45,6 +45,6 @@ EOS
end
def random_description
("<p>" + Faker::Lorem.sentences(6).join + "</p>").html_safe
Faker::Lorem.sentences(6).join("\n\n")
end
end

View File

@ -6,7 +6,8 @@
<% unless (defined? skip_description) && skip_description %>
<div class="description">
<%= random_description %>
<% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML) %>
<%= markdown.render(asciicast.description || random_description).html_safe %>
</div>
<% end %>
</div>