Elixir is a dynamic, functional language for building scalable and maintainable applications
24.61k
stars
3.38k
forks
source link
Code formatter: syntax error after formating heredoc with line break before terminator #6861
Closed
amatalai closed 7 years ago
Environment
Current behavior
Formatter output for this file
looks like this
which ends as
** (SyntaxError) lib/example.ex:5: invalid location for heredoc terminator, please escape token or move it to its own line: """
Expected behavior
VERSION A
Don't remove line break from last line of heredoc
VERSION B
Don't allow to use line break in last line of heredoc like some other languages. In this case I would like to make PR, something like this: https://github.com/amatalai/elixir/blob/7817b634a9877368ac314b55aa4a8ab53e881cc4/lib/elixir/src/elixir_tokenizer.erl#L725-L727, but maybe with better message :)