Mustache Markdown Helper
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