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

directory nested angle bracket component breaks the template compiler #391

Open
stephencattaneo opened this issue Jun 28, 2019 · 1 comment

Comments

@stephencattaneo
Copy link

stephencattaneo commented Jun 28, 2019

Code:

{{#docs-demo as |demo|}}
  {{#demo.example name='important'}}
    <Button::Important>Foo</Button::Important>
  {{/demo.example}}

  {{demo.snippet 'important'}}
{{/docs-demo}}

Error:

Template Compiler Error (broccoli-persistent-filter:TemplateCompiler) in dummy/templates/docs/components/buttons.hbs

Closing tag `Button::Important` (on line 6) without an open tag.

This bug does not occur if the component is self closing:

{{#docs-demo as |demo|}}
  {{#demo.example name='important'}}
    <Button::Important />
  {{/demo.example}}

  {{demo.snippet 'important'}}
{{/docs-demo}}
@kpatelsecondst
Copy link

kpatelsecondst commented Jul 18, 2019

An interesting temporary workaround to this is adding any arbitrary attribute or even a space to the opening tag for any docs-demo item.

Example (breaks rendering)

<Button::Important>
   foo
</Button::Important>

Example (renders fine by even just adding a space in the opening tag)

<Button::Important >
   foo
</Button::Important>

Example (add any arbitrary attribute, also renders fine):

<Button::Important class="bar">
   foo
</Button::Important>

I assume something is off in the regex.

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

No branches or pull requests

2 participants