Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display available tutorials (rstudio#234)
* add an available tutorials method * return unique tutorials only * Tests for available_tutorials * check if package exists * make available tutorials invisible when returning from run_tutorial * add `stop.` which equals `stop(..., call. = FALSE)` * add tests * document * add close matching if within 3 letters ``` ❯❯ dev_load(); run_tutorial("helloo", "learnr") Loading learnr Error: Tutorial "helloo" was not found in the "learnr" package. Did you mean "hello"? Available "learnr" tutorials: "hello", "question_type", "slidy" ``` * import adist from utils * added new news item and rearranged the news order * ignore case within adist to give best match * give slidy a title * comment why using 'missing' * add an example in run_tutorial. Also display all available learnr tutorials Fixes rstudio#223 * use NULL default values for run_tutorial to avoid "missing" issues * extract out available_tutorial methods to a single file. Add formatting methods return an invisible data.frame of the information * cleaner error formatting * minor code feedback
- Loading branch information