# Not able to construct the doc string

**URL:** <https://discourse.julialang.org/t/not-able-to-construct-the-doc-string/18396>\
**Category:** General Usage\
**Created:** [December 6, 2018, 8:42pm UTC](https://discourse.julialang.org/t/not-able-to-construct-the-doc-string/18396 "2018-12-06T20:42:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [December 6, 2018, 8:42pm UTC](https://discourse.julialang.org/t/not-able-to-construct-the-doc-string/18396/1 "2018-12-06T20:42:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [December 6, 2018, 9:15pm UTC](https://discourse.julialang.org/t/not-able-to-construct-the-doc-string/18396/2 "2018-12-06T21:15:43Z")

</div>

Escape the inner `"`s.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [December 6, 2018, 10:41pm UTC](https://discourse.julialang.org/t/not-able-to-construct-the-doc-string/18396/3 "2018-12-06T22:41:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [December 6, 2018, 10:53pm UTC](https://discourse.julialang.org/t/not-able-to-construct-the-doc-string/18396/4 "2018-12-06T22:53:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [December 6, 2018, 11:53pm UTC](https://discourse.julialang.org/t/not-able-to-construct-the-doc-string/18396/5 "2018-12-06T23:53:39Z")

</div>

True.
