Closed HertzDevil closed 9 months ago
This happens with GitHub itself too, so it should not be used as a guide of correctness:
# crystal
foo(<<-EOS, 1)
abcde
EOS
foo(<<-EOS, <<-MSG)
1
EOS
2
MSG
# ruby
foo(<<-EOS, 1)
abcde
EOS
foo(<<-EOS, <<-MSG)
1
EOS
2
MSG
Related: crystal-lang-tools/language-crystal#29
I don't think this is possible to fix without tree-sitter or an LSP, due to the complexity of Heredocs.
For comparison, here is how the same code looks like in Ruby:
(It appears they use only the last heredoc name as the delimiter for all heredocs that immediately follow.)