I am using redcarpet to render my markdown text. here is the function I am using:
def markdown(text)
render_options = { hard_wrap: true, filter_html: true }
markdown_options = { autolink: true, no_intra_emphasis: true }
markdown = Redcarpet::Markdown.new(
Redcarpet::Render::HTML.new(render_options), markdown_options
)
markdown.render(text).html_safe
end
I am unable to render list items with it. for ex:
I am just a sentense
* list item 1
* list item 2
gets translated to:
<p>
<p>I am just a sentense<br>
* list item 1<br>
* list item 2</p>
</p>
However, if I don't use a sentence to start my text, ex:
# head
* list me
* and me
everything seems to be fine:
<p>
<h1>head</h1>
<ul>
<li>list me</li>
<li>and me</li>
</ul>
</p>
I know redcarpet uses daring fireball but there doesn't seem to be any documentation about problem I am having.