Module: SimpleMarkdown::ActionView::Helpers
- Defined in:
- lib/simple_markdown/action_view/helpers.rb
Instance Method Summary collapse
-
#simple_markdown(text) ⇒ Object
Main entry.
Instance Method Details
#simple_markdown(text) ⇒ Object
Main entry
13 14 15 16 17 18 19 |
# File 'lib/simple_markdown/action_view/helpers.rb', line 13 def simple_markdown(text) text = text.gsub(/\r\n?/, "\n").split(/\n/) @text_map = text.map @io = StringIO.new parse_p @io.string.html_safe end |