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

Parse error on {{! mustache comment in .gts #706

Closed
chancancode opened this issue Mar 8, 2024 · 4 comments · Fixed by #655
Closed

Parse error on {{! mustache comment in .gts #706

chancancode opened this issue Mar 8, 2024 · 4 comments · Fixed by #655

Comments

@chancancode
Copy link

<template>
  {{!
    like this
  }}
</template>
Parse error on line 2:
...                  {{!                  
-----------------------^
Expecting 'OPEN_SEXPR', 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'glint
@chancancode
Copy link
Author

@NullVoxPopuli you tried this on #655? I would think the problem is that Glint is using too old a version of @glimmer/syntax, not because of the stuff content-tag would fix

@chancancode
Copy link
Author

I think prettier wants to format into this style out of the box so this is somewhat of a blocker in converting .hbs files with comments

@dfreeman
Copy link
Member

We have examples of this parsing fine in general (e.g. here), so this may need a more detailed reproduction

@chancancode
Copy link
Author

chancancode commented Mar 11, 2024

Aha, you are right, it requires a back tick inside the comment, so @NullVoxPopuli is right that this is in fact #655 territories

export default class Foo {
  <template>{{! ` }}</template>
}

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.

2 participants