method
markdown
v2.1.0 -
Show latest stable
-
0 notes -
Class: ActionView::Helpers::TextHelper
- 1.0.0 (0)
- 1.1.6 (0)
- 1.2.6 (2)
- 2.0.3 (30)
- 2.1.0 (0)
- 2.2.1 (0)
- 2.3.8 (1)
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
markdown(text)
public
Returns the text with all the Markdown codes turned into HTML tags. This method is only available if BlueCloth is available.
Examples
markdown("We are using __Markdown__ now!") # => "<p>We are using <strong>Markdown</strong> now!</p>" markdown("We like to _write_ `code`, not just _read_ it!") # => "<p>We like to <em>write</em> <code>code</code>, not just <em>read</em> it!</p>" markdown("The [Markdown website](http://daringfireball.net/projects/markdown/) has more information.") # => "<p>The <a href="http://daringfireball.net/projects/markdown/">Markdown website</a> # has more information.</p>" markdown('![The ROR logo](http://rubyonrails.com/images/rails.png "Ruby on Rails")') # => '<p><img src="http://rubyonrails.com/images/rails.png" alt="The ROR logo" title="Ruby on Rails" /></p>'