Can I disable the underscore function in markdown?

C

cap

I just wrote some ariticles about ruby and rails using markdown's
syntax.
I found that there are so many xxx_yyy methods descriped in my document
and markdown mess them up to this

xxx_yy .... aaa_bbb (I want)=> xxx yy...aaa(italic) bbb

The only solution I found now is warp them all in ``.
But doing this break my layout because of the <code></code> gen by ``

The underscore's usage is convention in ruby so I want to disable it's
function in markdown

Is there anybody can give me an advice?
 
R

Ross Bamford

The underscore's usage is convention in ruby so I want to disable it's
function in markdown

Is there anybody can give me an advice?

You should be able to escape it:

this is\_a? literal underscore

If you're doing from a Ruby string don't forget to escape the escape:

md = "this is\\_a? literal underscore"

It is a royal pain in the arse. Use Textile instead ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top