ember-learn / ember-learn/ember-cli-addon-docs
Path searching for type has incorrect regex
- Dominant language
- JavaScript
- Stars
- 172
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
The code at https://github.com/ember-learn/ember-cli-addon-docs/blob/master/addon/routes/docs/api/item.js#L21 is looking for a type to use when looking for a matching module. However when I have a path that has a directory ending in "s", it fails to find the correct module because the type is incorrect.
Given the path "components/yeti-table/header/filters/column/input" the type on the line above will be "components/yeti-table/header/filter" when it should be "component". If you use the regex /^(.*?)s\// it will find the correct type
Looks like this was introduced with https://github.com/ember-learn/ember-cli-addon-docs/pull/167
It seems pretty straightforward and I would submit a pull request, except looking at the tests I have no idea where I would supply a test for this. It looks like you might have to create an addon that had component ending in "s" with sub components somewhere in your test apps.
Contributor guide
Assessment
This issue has not been assessed yet.