Not able to construct the doc string


#1

How does one do this? This is supposed to be a doc string with a code block which should include a string literal in triple quotes ( for obvious reasons I can’t quote this with triple `'s):

“”"
bar(x)

```
bar(""“My
bane?
“””)
```
“”"
bar(x) = x


#2

Escape the inner "s.


#3

I was afraid that was going to be the only answer. I’ve tried that, obviously, but I didn’t like it, since in that case I cannot just copy and paste to execute the code. It doesn’t work when the quotation marks are escaped.


#4

You can copy and paste it from everything (REPL docs, Documenter HTML docs) except the source itself.


#5

True.