ember-learn / ember-learn/ember-cli-addon-docs
Path searching for type has incorrect regex
- Lingua principale
- JavaScript
- Stelle
- 172
- Fork
- 142
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da addon/routes/docs/api/item.js alla riga 21 e segui come viene derivato il tipo per components/yeti-table/header/filters/column/input. Riproduci il tipo errato, quindi aggiungi un test di regressione che utilizzi un percorso di componente contenente una directory che termina con “s” e verifica che venga trovato il modulo corrispondente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- documentation
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100