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] Allow no closing djlint:on comment #649

Closed
2 tasks done
twolfson opened this issue May 13, 2023 · 6 comments
Closed
2 tasks done

[FEATURE] Allow no closing djlint:on comment #649

twolfson opened this issue May 13, 2023 · 6 comments
Labels

Comments

@twolfson
Copy link

twolfson commented May 13, 2023

Feature Request

Loving the idea behind this library! I'm coming from being very used to prettier and black to cut out dev time just indenting =)

During my initial testing and setup though, I ran into a snag with how djlint:off is handled.

Setup:

index.html:

{# djlint:off #}
<div style="background: linen; height: 100vh">
    Hello
</div>

Expected behavior:

djlint index.html
# Should see success, no error code

Actual behavior:

djlint index.html
#####
index.html
────────────────────────────────
H021 2:0 Inline styles should be avoided. <div style=

Linted 1 file, found 1 error.
@welcome
Copy link

welcome bot commented May 13, 2023

Thanks for opening your first issue here!

@christopherpickering
Copy link
Contributor

Thanks, I can check that out, it's more of a bug than feature probably :)

christopherpickering pushed a commit that referenced this issue May 18, 2023
# [1.28.0](v1.27.2...v1.28.0) (2023-05-18)

### Bug Fixes

* **formatter:** allow djlint:off to exluce the rest of a file ([17faf5f](17faf5f)), closes [#649](#649)
* **formatter:** don't add blank line to empty files ([8ea5fd2](8ea5fd2)), closes [#635](#635)

### Features

* **formatter:** added ability to format objects/arrays in function tags ([d446efc](d446efc)), closes [#370](#370)
* **formatter:** format set blocks ([d88371c](d88371c)), closes [#646](#646)
@christopherpickering
Copy link
Contributor

🎉 This issue has been resolved in version 1.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@twolfson
Copy link
Author

Geez, y'all are speedy!! Thank you!! =D

@twolfson
Copy link
Author

Ah, sadly this only works when there are no error codes specified x_x Will open a new ticket for that nuance =)

@christopherpickering
Copy link
Contributor

Thanks, sorry I didn't think of that one, the linter logic is a bit split out. Thanks for opening another issue.

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

No branches or pull requests

2 participants