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

hasBlock is true when it shouldn't be on new component syntax #338

Open
atomkirk opened this issue Jan 24, 2020 · 1 comment · May be fixed by #344
Open

hasBlock is true when it shouldn't be on new component syntax #338

atomkirk opened this issue Jan 24, 2020 · 1 comment · May be fixed by #344

Comments

@atomkirk
Copy link

This causes hasBlock to be true inside the avatar-image.{hbs|embl} when it should not be

      %AvatarImage @url=this.session.currentUser.avatarCloudFile.downloadUrl @name=this.session.currentUser.name
      = this.session.currentUser.shortName

If I use the older syntax, it seems to work

      = avatar-image url=this.session.currentUser.avatarCloudFile.downloadUrl name=this.session.currentUser.name
      = this.session.currentUser.shortName
@ghost
Copy link

ghost commented Apr 28, 2020

This seems to be because angle bracket components are considered to have block if they have a closing tag.
Emblem always produces:

<AvatarImage @url={{}} ... ></AvatarImage>
vs
<AvatarImage @url={{}} ... />

i am not that much of an expert of pegjs to be able to fix it quickly, looking at it, though.

evgenibir added a commit to evgenibir/emblem.js that referenced this issue Mar 27, 2021
…alue=foo`.

Also glimmer component will be non-blocked if it's not contain nested nodes.
resolved machty#338
@evgenibir evgenibir linked a pull request Mar 27, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant