Title / Description
Code module CommentsHelper def format_comment(content) simple_format(keep_spaces_at_beginning(h(content))) end def keep_spaces_at_beginning(content) content.split("\n").map do |line| line.sub(/^ +/) do |spaces| ' ' * spaces.length end end.join("\n") end end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code