Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] [Formatter] sorl-thumbnail's django template tag indentation #714

Closed
josvleeuwen opened this issue Jul 13, 2023 · 4 comments · Fixed by #717
Closed

[FEATURE] [Formatter] sorl-thumbnail's django template tag indentation #714

josvleeuwen opened this issue Jul 13, 2023 · 4 comments · Fixed by #717
Labels

Comments

@josvleeuwen
Copy link

josvleeuwen commented Jul 13, 2023

System Info

  • OS: ubuntu 23.04
  • Python Version 3.11.1
  • djLint Version 1.31.1
  • template language: django + sorl-thumbnail

Issue

When I use sorl-thumbnail to generate a thumbnail of an image with this code the formatter messes up the indentation:

    // <-- 4 spaces
    {% thumbnail person.profile_photo "200x200" crop="center" as im %}
    <img src="{{ im.url }}"
         width="{{ im.width }}"
         height="{{ im.height }}"
         class="img-thumbnail"
         alt="{{ person.name }}">
{% endthumbnail %}
// <-- 0 spaces

How To Reproduce

Copy & paste the code above.

@josvleeuwen josvleeuwen added 🦠 bug Something isn't working 🧽 formatter labels Jul 13, 2023
@welcome
Copy link

welcome bot commented Jul 13, 2023

Thanks for opening your first issue here!

@christopherpickering
Copy link
Contributor

Hey, can you add your config? Did you add thumbnail as a custom block in it?

@christopherpickering christopherpickering changed the title [BUG] [Formatter] sorl-thumbnail's django template tag indentation issue [FEATURE] [Formatter] sorl-thumbnail's django template tag indentation Jul 17, 2023
@christopherpickering
Copy link
Contributor

@josvleeuwen I will add support for this in the next release. Thanks!

christopherpickering pushed a commit that referenced this issue Jul 19, 2023
# [1.32.0](v1.31.1...v1.32.0) (2023-07-19)

### Bug Fixes

* **formatter:** fixed formatting on chained function ([7c2756d](7c2756d)), closes [#704](#704)
* **linter:** fixed false positive on h026 data-id ([400882a](400882a)), closes [#711](#711)
* **linter:** fixed golang false positive on T027 ([232f4bc](232f4bc)), closes [#712](#712)

### Features

* **formatter:** added support for jazzband's sorl-thumbnail tags ([86122dc](86122dc)), closes [#714](#714)
@christopherpickering
Copy link
Contributor

🎉 This issue has been resolved in version 1.32.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants