vmg / redcarpet

The safe Markdown parser, reloaded.
MIT License
4.97k stars 524 forks source link

`\` dosen't work well on "_" #214

Closed jjyr closed 10 years ago

jjyr commented 11 years ago
render.render("\\_dd_")
=> "<p>_dd_</p>\n"
#is ok

but

render.render("_dd\\_dd_")
=> "<p><em>dd\\</em>dd_</p>\n"
#unexpect, it should be
#<p><em>dd_dd</em></p>\n
mattr- commented 11 years ago

What options are you using when you parsing the markdown document?

jjyr commented 11 years ago

@mattr- :autolink => true, :space_after_headers => false, strikethrough: true, :fenced_code_blocks => true

mattr- commented 11 years ago

Awesome. Thanks! A bit behind on looking at issues at the moment, but I'll get to this one as soon as I can.

On Fri, Apr 5, 2013 at 4:13 AM, jjy notifications@github.com wrote:

@mattr- https://github.com/mattr- :autolink => true, :space_after_headers => false, strikethrough: true, :fenced_code_blocks => true

— Reply to this email directly or view it on GitHubhttps://github.com/vmg/redcarpet/issues/214#issuecomment-15945729 .

jcheatham commented 11 years ago

Piggy-backing another broken evaluation case onto this issue (as they're superficially related at least):

renderer = Redcarpet::Render::HTML.new
markdown = Redcarpet::Markdown.new(renderer)
markdown.render("blah \\\\server\\path blah")
=> "<p>blah \\server\\path blah</p>\n"
robin850 commented 10 years ago

This issue has been addressed in #380 thanks to @jcheatham so we can give it a close. Thank you everyone! :-)