emblem.js icon indicating copy to clipboard operation
emblem.js copied to clipboard

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

Open atomkirk opened this issue 5 years ago • 1 comments

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

atomkirk avatar Jan 24 '20 00:01 atomkirk

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.

ghost avatar Apr 28 '20 19:04 ghost