Hello,
We have Code.Formatter.to_algebra(string, opts) used by Code.format_string!
Can we also have Code.Formatter.quoted_to_algebra(quoted, opts)?
I am looking the way to format quoted with heredoc metadata as heredoc.
Currently, there is no way to do it because we cannot format quoted
and Macro.to_string() does not output heredocs.
{:__block__, [format: :bin_heredoc, line: 1], ["foo\nbar\n"]}
|> Macro.to_string()
# => "\"foo\\nbar\\n\""
You can do it only with block_to_algebra which is private in Code.Formatter.
If we could have public quoted_to_algebra this could be possible.
Thanks,
Serge