According to the Redcarpet manual, the auto_wrap
option goes into the Renderer initializer like this:
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(hard_wrap: true), autolink: true, space_after_headers: true)
puts markdown.render("Line 1\n Line 2")
which gives me this output
<p>Line 1<br>
Line 2</p>
https://github.com/vmg/redcarpet#darling-i-packed-you-a-couple-renderers-for-lunch
Please note that I couldn't find a MarkdownRenderer
class as Redcarpet comes only with a Redcarpet::Render::HTML
and Redcarpet::Render::XHTML
built in renderer.