Skip to content

Instantly share code, notes, and snippets.

@shanlalit
Forked from defunkt/my_view.rb
Created April 28, 2010 07:19
Show Gist options
  • Save shanlalit/381824 to your computer and use it in GitHub Desktop.
Save shanlalit/381824 to your computer and use it in GitHub Desktop.
class MyView < Mustache
def markdown(str = nil)
if str
Markdown.new(str.to_s).to_html
else
lambda { |text| markdown(render(text)) }
end
end
end
<div class="column main">
{{# markdown}}
{{{ description }}}
{{/ markdown}}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment