# Maybe do not throw "invalid escape sequence" for docstrings (v0.7)

**URL:** <https://discourse.julialang.org/t/maybe-do-not-throw-invalid-escape-sequence-for-docstrings-v0-7/11536>\
**Category:** General Usage\
**Created:** [June 8, 2018, 12:04pm UTC](https://discourse.julialang.org/t/maybe-do-not-throw-invalid-escape-sequence-for-docstrings-v0-7/11536 "2018-06-08T12:04:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [June 8, 2018, 12:04pm UTC](https://discourse.julialang.org/t/maybe-do-not-throw-invalid-escape-sequence-for-docstrings-v0-7/11536/1 "2018-06-08T12:04:03Z")

</div>

I have some cases where I have invalid escape sequences in docstrings. This is caused by using `\_` because the Atom syntax highlighter breaks without them. I understand that this is an editor bug, but I still don’t see the value in Julia throwing an error because of what’s in a comment – that should result in a warning, at most. The idea of a comment is to allow me to put whatever I want in it.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [June 8, 2018, 12:05pm UTC](https://discourse.julialang.org/t/maybe-do-not-throw-invalid-escape-sequence-for-docstrings-v0-7/11536/2 "2018-06-08T12:05:49Z")

</div>

> [@essenciary](#):
>
> Julia throwing an error because of what’s in a comment

Docstrings are not comments, docstrings are strings, and behave like strings.

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [June 8, 2018, 12:10pm UTC](https://discourse.julialang.org/t/maybe-do-not-throw-invalid-escape-sequence-for-docstrings-v0-7/11536/3 "2018-06-08T12:10:37Z")

</div>

Even so, it’s still excessive - what if I have sample output that’s meant to generate such an invalid escape sequence?

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [June 8, 2018, 12:45pm UTC](https://discourse.julialang.org/t/maybe-do-not-throw-invalid-escape-sequence-for-docstrings-v0-7/11536/4 "2018-06-08T12:45:03Z")

</div>

> [@essenciary](#):
>
> what if I have sample output that’s meant to generate such an invalid escape sequence?

That is not an escape sequence, it is just a string with a backslash in it, which needs to be escaped just like in any other Julia code:

```julia
julia> println("\\_")
\_

```
