Skip to content

Instantly share code, notes, and snippets.

@fcoury
Forked from mudge/application_helper.rb
Created December 28, 2008 06:45
Show Gist options
  • Save fcoury/40397 to your computer and use it in GitHub Desktop.
Save fcoury/40397 to your computer and use it in GitHub Desktop.
require 'maruku' # or use config.gem "maruku" in environment.rb
module ApplicationHelper
# Replacement for Rails' default Markdown helper which uses Maruku instead
# of BlueCloth.
def markdown(text)
text.blank? ? "" : Maruku.new(text).to_html
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment