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
Handlebars: Fix incorrect classic component syntax formatting #8593
Handlebars: Fix incorrect classic component syntax formatting #8593
Conversation
5674e08
to
6e8d7f4
Compare
6e8d7f4
to
a3a3486
Compare
@mikoscz Do you know how it broken in v2.0? Parser upgrade or something ? |
@@ -649,6 +651,10 @@ function locationToOffset(source, line, column) { | |||
} | |||
} | |||
|
|||
function doesNotHaveHashParams(node) { | |||
return node.hash.pairs.length === 0; |
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.
It is possible when node doesn't have hash
or hash.pairs
properites?
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.
According to glimmer MustacheStatement
interface, this is not possible.
https://github.com/glimmerjs/glimmer-vm/blob/cba8afd3e665087ce9aa1457181b1955cfee91f0/packages/%40glimmer/syntax/lib/types/nodes.ts#L92
https://github.com/glimmerjs/glimmer-vm/blob/cba8afd3e665087ce9aa1457181b1955cfee91f0/packages/%40glimmer/syntax/lib/types/nodes.ts#L226
Could you also add a test for:
|
@dcyriller how it should behave? {{
a-helper
'that takes some arguments'
this.anotherOne
'why not'
@aLastOneLongEnoughToBreak
}} {{a-helper
'that takes some arguments'
this.anotherOne
'why not'
@aLastOneLongEnoughToBreak
}} If the second one I think that we can change the behaviour to: |
@dcyriller Do you think that we need something more to move forward with this one? |
Resolves:
#8584
jgwhite#1 (comment)
jgwhite#1 (comment)
changelog_unreleased/handlebars/pr-8593.md
file followingchangelog_unreleased/TEMPLATE.md
.