Crystal: Formatter: String interpolation with macro expansion

Created on 22 Apr 2020  路  1Comment  路  Source: crystal-lang/crystal

When a string interpolation contains a macro expansion, it results in three consecutive curly braces: "#{{{ macro_expression }}}". Having spaces in between helps reading the code: "#{ {{ macro_expression }} }".
The formatter currently removes those spaces. I think it should rather add them when missing to improve readability.

feature topicformatter

Most helpful comment

Should it add space also for other expressions with curly braces? (tuples, hashes)

>All comments

Should it add space also for other expressions with curly braces? (tuples, hashes)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cjgajard picture cjgajard  路  3Comments

will picture will  路  3Comments

RX14 picture RX14  路  3Comments

asterite picture asterite  路  3Comments

Papierkorb picture Papierkorb  路  3Comments