Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighting does not work with escaped "\=" #369

Closed
jomo opened this issue Apr 18, 2014 · 3 comments
Closed

Highlighting does not work with escaped "\=" #369

jomo opened this issue Apr 18, 2014 · 3 comments
Labels

Comments

@jomo
Copy link
Contributor

jomo commented Apr 18, 2014

renderer = Redcarpet::Render::HTML.new
md = Redcarpet::Markdown.new(renderer, {highlight: true})
md.render("==url_param\===")

produces:

<p><mark>url_param</mark>=</p>

I'm expecting it to output:

<p><mark>url_param=</mark></p>

Unforunately my C skills are very limited, so I have no idea how to fix it :(

@robin850 robin850 added the bug label Apr 26, 2014
@robin850
Copy link
Collaborator

Hello @jomo,

Sorry for the late reply and thanks for reporting! It looks like all emphasis have the problem ; I will try to have a look:

>> require 'redcarpet'
=> true
>> parser = Redcarpet::Markdown.new(Redcarpet::Render::HTML);
>> parser.render("**foo\***")
=> "<p><strong>foo</strong>*</p>\n"

@jomo
Copy link
Contributor Author

jomo commented Apr 30, 2014

Perhaps related to #214?

@robin850
Copy link
Collaborator

This has been addressed in #380. By the way, there is gotcha with double quotes, you should write:

"==url_param\\==="
# or
'==url_param\==='

So my example is wrong as well, it should be '**foo\***'. Thanks for reporting anyway! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants