Fix Glimmer Concatenation#119
Merged
thecrypticace merged 5 commits intotailwindlabs:mainfrom Feb 7, 2023
Merged
Conversation
Glimmer supports concatenation via the `(concat)` helper. The plugin is currently incorrectly breaking up the concatenation This adds a failing test showing the issue.
MichalBryxi
reviewed
Jan 30, 2023
Contributor
|
I think, for now at least, we should special-case |
Use ignoreLast in a Glimmer StringLiteral if the parent is a SubExpression (meaning helper) and the last character of the node value is not whitespace Meaning `(concat "border-l-blue border-" @color)` does not get sorted While `(concat "border-l-blue border ")` does get sorted
The main issue is with (concat) so we will hardcode that in If in the future we think we need more helpers we can do that
a1a1946 to
4183b28
Compare
Contributor
Author
|
@thecrypticace Can you take another look please? |
Contributor
|
Thanks! Will get a release out this week with this change. Appreciate it! ✨ |
Contributor
Author
|
Thank you! Can't wait! |
Contributor
Author
|
Hey @thecrypticace, |
Contributor
|
@Alonski Ah sorry! This one slipped by me. Just published v0.2.3 on NPM |
Contributor
Author
|
Thanks! @MichalBryxi let's update our repo! |
bronisMateusz
pushed a commit
to bronisMateusz/prettier-plugin-tailwindcss-drupal
that referenced
this pull request
Apr 16, 2025
* test(Glimmer): Add Failing Test For Glimmer Concatenation Glimmer supports concatenation via the `(concat)` helper. The plugin is currently incorrectly breaking up the concatenation This adds a failing test showing the issue. * fix(Glimmer): Fix Glimmer Concatenation Use ignoreLast in a Glimmer StringLiteral if the parent is a SubExpression (meaning helper) and the last character of the node value is not whitespace Meaning `(concat "border-l-blue border-" @color)` does not get sorted While `(concat "border-l-blue border ")` does get sorted * fix(Glimmer): Only Fix Concat Helper The main issue is with (concat) so we will hardcode that in If in the future we think we need more helpers we can do that * Update changelog * Tweak regex --------- Co-authored-by: Jordan Pittman <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Glimmer supports concatenation via the
(concat)helper.The plugin is currently incorrectly breaking up the concatenation
I first added a failing test showing the issue.
Use ignoreLast in a Glimmer StringLiteral if the parent is a SubExpression (meaning helper) and the last character of the node value is not whitespace
Meaning
(concat "border-l-blue border-" @color)does not get sortedWhile
(concat "border-l-blue border ")does get sorted