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

Snippet examples don't get registered when used with angle brackets #420

Closed
abel-n opened this issue Oct 30, 2019 · 2 comments · Fixed by #421
Closed

Snippet examples don't get registered when used with angle brackets #420

abel-n opened this issue Oct 30, 2019 · 2 comments · Fixed by #421

Comments

@abel-n
Copy link
Contributor

abel-n commented Oct 30, 2019

ember-code-snippet's appropriate snippetRegexes options that is set up in this addon's ember-cli-build.js can't handle angle brackets, which might be misleading: although the docs do mention that:

you can copy-paste this block to get going in your own app

but they don't mention that actually any other way of invoking it, like naming <DocsDemo> yield something other than demo, using angle brackets or having example code in the same line as <demo.example> opening tag will provide with erroneous / unintended behavior.

I'll submit a PR to address angle bracket invocation but maybe one line in the <DocsDemo> docs could mention that users should always use demo as the yielded hash's reference.

@RobbieTheWagner
Copy link
Member

@abel-n there is a PR for it already #342

It has been waiting on tests. Would you be able to help with tests perhaps?

@abel-n
Copy link
Contributor Author

abel-n commented Oct 31, 2019

@rwwagner90 I don't know how to push to that PR but I opened another one. I wasn't sure what exactly to test but I think most of the stuff is covered.

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