-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
support angle brackets with docs-demo component #342
Conversation
The following snippet wasn't getting picked up by the original regex: ```hbs <DocsDemo as |demo|> <demo.example @name='button-example.hbs'> <MyButton> Click Me </MyButton> </demo.example> <demo.snippet @name='button-example.hbs'/> </DocsDemo> ``` This shouldn't break existing classic component invocation of `docs-demo`.
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.
Thanks, @noslouch! Would you mind including a simple test for this as well?
begin: /{{#(?:docs-snippet|demo.example)\sname=(?:"|')(\S+)(?:"|')/, | ||
end: /{{\/(?:docs-snippet|demo.example)}}/, | ||
begin: /(?:{{#|<)(?:docs-snippet|demo.example)\s@?name=(?:"|')(\S+)(?:"|')/, | ||
end: /(?:{{|<)\/(?:docs-snippet|demo.example)(?:}}|>)/, |
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.
For this to work for standalone snippets, we'd need to accept DocsSnippet
here as well, wouldn't we?
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.
Ah, yeah that’s right. Good catch.
Nowhere! I’m not sure where to start with a test for this 😞 |
@noslouch I think what I'd do is add a route in the testing addon (under |
The following snippet wasn't getting picked up by the original regex:
This shouldn't break existing classic component invocation of
docs-demo
.