Open klette opened 1 year ago
Thanks for opening your first issue here!
Thanks for reporting! You are welcome to do a pr with this, otherwise I will get it in a release next week.
chained was pretty rough :D
:tada: This issue has been resolved in version 1.32.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
I don't have time to get to #720 in the next few days so I will roll back this change until then.
I did leave in a fix for the extra spaces, even in chained functions, but only the first function will be formatted currently.
System Info
Issue
When function formatting is enabled the following template is formated wrongly breaking the template.
becomes
The simple case of attribute access directly after the function call is easy enough to fix by adding
\w
to the\d
in the "index" capture group (matching group 5).Here with some comments on the regex added during testing the issue:
But the repeated case requires a bit more work to fix I think.
How To Reproduce
Add the following test cases to
tests/test_jinja/test_parenthesis.py
: