-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Jinja formatting issues #715
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7b7e504
- Added some regex to ensure we have double quoted attributes for the…
jessielw 4a1dc72
- Fixed testing to be in line with the single quotes inside and doubl…
jessielw 7d4d93f
- Fix comment
jessielw f8fc285
- Add both quote styles to the jinja parenthesis test
jessielw e9dc2aa
- Add the ability to detect what ever the outer most quotes was for e…
jessielw 71698c0
updated test
christopherpickering 14dc271
Merge branch 'master' into jinja-formatting-issues
jessielw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, instead of changing the test here, can you just do 2 tests? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nunjucks is pretty much identical to jinja, and anyone else using quotes can benefit from this :) Do you mind to remove the the profile check?
aren't cases like this still going to confuse vs code?
The other odd case is where there is a line break:
I think if we move this down to where we do the set tag formatting, it will be able to work w/ wrapping.
At the same time it might be good to add a flag --single-quote-templatetags, vs a --single-quote tag we can add later on for just html attributes.
Thanks for starting this, if you don't wanna invest more time you can leave as is and I can pick it up sometime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can take a look at it to see if I can improve it further in the ways you suggested.
Specifically by
set tag formatting
are you referring to?In reference to this photo
I'm not 100% how we could remedy this yet.
I'll think on some things and take a look at this tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah you must be referring to for the set tag
If this is not correct please point me where you think i should impliment thr changes
I'll look into this and see if I can improve it further.
As far as the linter for
<a href='{{ url("fo\"o") }}'></a>
what would you suggest to improve this?
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey sorry for the delay, yep I think this is the place- it is where the contents of functions are updated.
I'm free to discord call early afternoon today if it's good for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to add me on discord
jlw_4049
so we can talk quicker