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.


You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to