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


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.


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


Even so, it’s still excessive - 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> println("\\_")