2006-05-08から1日間の記事一覧

Rails で markdown

require 'bluecloth'してる環境であれば View の Helper (TextHelper内)で markdown() が定義されているのでそれを使える.まぁ,View以外なら,そのまま Bluecloth.new(text).to_html でも大した問題ではないんだけど,Viewで使うならやはり <%= markdown(t…