-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prior to this commit, `RDoc::Generator::SDoc#index` exhibited the following incorrect behaviors: 1. When `--main` was not specified, `index` would choose the alphabetically-first file as the main page, instead of the first file in the list of files. 2. When `--main` was specified but was prefixed with `--root`, and `--root` did not start with "rails/", `index` would choose the alphabetically-first file. (Such as when `--root` was an absolute path, or a deeply nested relative path, or simply a path for a non-Rails project.) 3. When `--main` was specified but was not in the list of files, `index` would choose the alphabetically-first file. This commit fixes `RDoc::Generator::SDoc#index` such that it: 1. Chooses the first file in the list of files as the default main page. 2. Handles any kind of `--main` path. 3. Raises an error when `--main` isn't among the rendered files.
- Loading branch information
1 parent
edb3ec8
commit 15b2a5f
Showing
4 changed files
with
70 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters