diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 416ee57..d6d9e9a 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -16,4 +16,9 @@ module ApplicationHelper
image_tag user.avatar_url || default_avatar_url,
:title => nickname, :alt => nickname, :class => "avatar"
end
+
+ def markdown(&block)
+ markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
+ markdown.render(capture(&block)).html_safe
+ end
end
diff --git a/app/views/asciicasts/_asciicast.html.erb b/app/views/asciicasts/_asciicast.html.erb
index 4d830be..c44a929 100644
--- a/app/views/asciicasts/_asciicast.html.erb
+++ b/app/views/asciicasts/_asciicast.html.erb
@@ -6,8 +6,7 @@
<% unless (defined? skip_description) && skip_description %>
- <% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML) %>
- <%= markdown.render(asciicast.description.to_s).html_safe %>
+ <%= markdown do %><%= asciicast.description.to_s %><% end %>
<% end %>
diff --git a/app/views/home/show.html.erb b/app/views/home/show.html.erb
index f604f83..e609004 100644
--- a/app/views/home/show.html.erb
+++ b/app/views/home/show.html.erb
@@ -51,28 +51,26 @@
Use it
- <% markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML) %>
- <%= markdown.render(<
+To install or upgrade **ascii.io** recorder, open a terminal and run following command:
- $ curl -sL get.ascii.io | bash
+ $ curl -sL get.ascii.io | bash
- (when using zsh you may need to run `rehash` after above command)
+(when using zsh you may need to run `rehash` after above command)
- That's it! Now you can start recording your terminal sessions with:
+That's it! Now you can start recording your terminal sessions with:
- $ asciiio
+ $ asciiio
- If you want your recordings to be assigned to your ascii.io profile (btw, see mine: [~sickill](/~sickill)) run this
- and follow instructions:
+If you want your recordings to be assigned to your ascii.io profile (btw, see mine: [~sickill](/~sickill)) run this
+and follow instructions:
- $ asciiio auth
+ $ asciiio auth
- See available commands and options with:
+See available commands and options with:
- $ asciiio -h
-EOS
- %>
+ $ asciiio -h
+ <% end %>
<%# <%= link_to 'See help', manual_path, :class => "btn btn-large" %1> %>