Skip to content

Instantly share code, notes, and snippets.

@ivan
Created August 7, 2018 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivan/884bd4b6757318e0fe927ff8b6b36cd2 to your computer and use it in GitHub Desktop.
Save ivan/884bd4b6757318e0fe927ff8b6b36cd2 to your computer and use it in GitHub Desktop.
# iex
Erlang/OTP 21 [erts-10.0.3] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Interactive Elixir (1.8.0-dev) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> x = """
...(1)> 3
...(1)> """
"3\n"
iex(2)> x =
...(2)> """
...(2)> 3
...(2)> """
"3\n"
iex(3)> x =
...(3)> """
...(3)> 3
...(3)> """
" 3\n"
iex(4)> x =
...(4)> """
...(4)> 3
...(4)> """
" 3\n"
iex(5)> x =
...(5)> """
...(5)> 3
...(5)> """
warning: outdented heredoc line. The contents inside the heredoc should be indented at the same level as the closing """. The following is forbidden:
def text do
"""
contents
"""
end
Instead make sure the contents are indented as much as the heredoc closing:
def text do
"""
contents
"""
end
The current heredoc line is indented too little
iex:7
"3\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment