# Can I disable the underscore function in markdown?

**URL:** <https://www.ruby-forum.com/t/can-i-disable-the-underscore-function-in-markdown/51531>\
**Category:** Ruby\
**Created:** [January 2, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/can-i-disable-the-underscore-function-in-markdown/51531 "2006-01-02T17:15:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e9bcb4/32.png) [@cap](https://www.ruby-forum.com/u/cap)\
**Post date:** [January 2, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/can-i-disable-the-underscore-function-in-markdown/51531/1 "2006-01-02T17:15:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![cap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e9bcb4/32.png) [@cap](https://www.ruby-forum.com/u/cap)\
**Post date:** [January 2, 2006, 7:31pm UTC](https://www.ruby-forum.com/t/can-i-disable-the-underscore-function-in-markdown/51531/2 "2006-01-02T19:31:11Z")

</div>

On Mon, 02 Jan 2006 14:55:05 -0000, cap [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 😉
