arr-ai / arrai

The ultimate data engine.
http://arr.ai
Apache License 2.0
20 stars 15 forks source link

strip last whitespaces in a string template #587

Closed nofun97 closed 4 years ago

nofun97 commented 4 years ago

Initially, the expression

$"
stuff:
    ${[1, 2, 3] >> $"
        letter:
    "::\i}
"

will output:

stuff:
    letter:

    letter:

    letter:

This is caused by the newline after the word letter: in the string template.

This commit removes the last whitespaces of string expression for better formatting of multiline expression. The output now is:

stuff:
    letter:
    letter:
    letter:

Checklist:

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build b1d71291e34a72e597227157958f8aace7ac71a0-PR-587


Files with Coverage Reduction New Missed Lines %
rel/value_tuple.go 2 75.2%
rel/value_set_dict.go 3 43.36%
<!-- Total: 5 -->
Totals Coverage Status
Change from base Build bcf3599b377a8304eaa4a674fd0561109be04f56: -0.03%
Covered Lines: 4621
Relevant Lines: 9570

💛 - Coveralls