# Docstring not rendering underscore

**URL:** https://discourse.julialang.org/t/docstring-not-rendering-underscore/15818
**Category:** General Usage
**Created:** [October 3, 2018, 7:24am UTC](https://discourse.julialang.org/t/docstring-not-rendering-underscore/15818 "2018-10-03T07:24:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)
#### Post date: [October 3, 2018, 7:24am UTC](https://discourse.julialang.org/t/docstring-not-rendering-underscore/15818/1 "2018-10-03T07:24:05Z")

</div>

I have a docstring which is quoted in triple "  
When I use `?my_fn` the help which is shown, is missing SOME underscores, but not all.

I tried masking the underscores with a backslash but that will not be parsed by julia.

Any ideas?

 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/6/164170933444345ed5b8fa0c7b45b7ec877c562a.png)

```julia
"""
prepare_something!(dfin,treat_as_categorical_variable,independent_vars::Vector{String})

bla bla
"""
function prepare_something!(dfin,treat_as_categorical_variable,independent_vars)
    return 1
end

```

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [October 3, 2018, 7:33am UTC](https://discourse.julialang.org/t/docstring-not-rendering-underscore/15818/2 "2018-10-03T07:33:30Z")

</div>

You can stop this happening by putting some spaces before the function:

```julia
"""
     prepare_something!(dfin,treat_as_categorical_variable,independent_vars::Vector{String})

bla bla
"""

```

I think it’s Markdown trying to make things italicized…

The manual quoth:

> Always show the signature of a function at the top of the documentation, with a four-space indent so that it is printed as Julia code.

---

<div class="post-metadata">

### Author: ![JosePereiraUA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josepereiraua/32/37640_2.png) [@JosePereiraUA](https://discourse.julialang.org/u/JosePereiraUA)
#### Post date: [May 6, 2022, 9:47am UTC](https://discourse.julialang.org/t/docstring-not-rendering-underscore/15818/3 "2022-05-06T09:47:54Z")

</div>

Quickly coming back to this question: the same thing is happening to me, but in the docstring body.

![image](https://global.discourse-cdn.com/julialang/original/3X/d/a/da5949a749530d90b308dddfe44e85a868614a73.png)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/5/d5ab690fb8c95d9aa48e73647634f66d87bbe241.png)

Any tip?

---

<div class="post-metadata">

### Author: ![JosePereiraUA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josepereiraua/32/37640_2.png) [@JosePereiraUA](https://discourse.julialang.org/u/JosePereiraUA)
#### Post date: [May 6, 2022, 9:50am UTC](https://discourse.julialang.org/t/docstring-not-rendering-underscore/15818/4 "2022-05-06T09:50:41Z")

</div>

Literally 5 min after posting this follow up question I figured it out. I leave it here for newcomers: Just use double backticks.

![image](https://global.discourse-cdn.com/julialang/original/3X/a/2/a2e5cf8071b6fa58264d80760b7c393c04097edb.png)

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [May 6, 2022, 12:22pm UTC](https://discourse.julialang.org/t/docstring-not-rendering-underscore/15818/5 "2022-05-06T12:22:52Z")

</div>

or just quote it with backticks like you did for `residue_id`?

---

<div class="post-metadata">

### Author: ![JosePereiraUA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josepereiraua/32/37640_2.png) [@JosePereiraUA](https://discourse.julialang.org/u/JosePereiraUA)
#### Post date: [June 30, 2022, 12:31pm UTC](https://discourse.julialang.org/t/docstring-not-rendering-underscore/15818/6 "2022-06-30T12:31:55Z")

</div>

Yes, you can do that, but in the final visualization (if you’re using Documenter.jl) this will be rendered diferently, `like this`.
