Forum: Ruby Can I disable the underscore function in markdown?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
94af373d42084bf8b07f461291a910a3?d=identicon&s=25 cap (Guest)
on 2006-01-02 17:15
(Received via mailing list)
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?
82e62c756d89bc6fa0a0a2d7f2b1e617?d=identicon&s=25 Ross Bamford (Guest)
on 2006-01-02 19:31
(Received via mailing list)
On Mon, 02 Jan 2006 14:55:05 -0000, cap <capitain@gmail.com> wrote:

> 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 ;)
This topic is locked and can not be replied to.