Skip to content

Commit

Permalink
Rename theme-checker option to check-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Nov 18, 2019
1 parent 82872ad commit 8f44c60
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/doc/rustdoc/src/command-line-arguments.md
Expand Up @@ -368,7 +368,7 @@ you'll need to this flag as follows:
$ rustdoc src/lib.rs --themes /path/to/your/theme/file.css
```

### `theme-checker`: check if your themes implement all the required rules
### `check-theme`: check if your themes implement all the required rules

This flag allows you to check if your themes implement the necessary CSS rules. To put it more
simply, when adding a new theme, it needs to implements all the CSS rules present in the "light"
Expand All @@ -377,5 +377,5 @@ CSS theme.
You can use this flag like this:

```bash
$ rustdoc src/lib.rs --theme-checker /path/to/your/theme/file.css
$ rustdoc src/lib.rs --check-theme /path/to/your/theme/file.css
```
6 changes: 3 additions & 3 deletions src/doc/rustdoc/src/unstable-features.md
Expand Up @@ -304,14 +304,14 @@ $ rustdoc src/lib.rs -Z unstable-options --themes theme.css

Giving this flag to `rustdoc` will make it copy your theme into the generated crate docs and enable
it in the theme selector. Note that `rustdoc` will reject your theme file if it doesn't style
everything the "light" theme does. See `--theme-checker` below for details.
everything the "light" theme does. See `--check-theme` below for details.

### `--theme-checker`: verify theme CSS for validity
### `--check-theme`: verify theme CSS for validity

Using this flag looks like this:

```bash
$ rustdoc -Z unstable-options --theme-checker theme.css
$ rustdoc -Z unstable-options --check-theme theme.css
```

Before including your theme in crate docs, `rustdoc` will compare all the CSS rules it contains
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static_files.rs
Expand Up @@ -59,7 +59,7 @@ pub static RUST_FAVICON: &'static [u8] = include_bytes!("static/favicon.ico");
/// The built-in themes given to every documentation site.
pub mod themes {
/// The "light" theme, selected by default when no setting is available. Used as the basis for
/// the `--theme-checker` functionality.
/// the `--check-theme` functionality.
pub static LIGHT: &'static str = include_str!("static/themes/light.css");

/// The "dark" theme.
Expand Down
4 changes: 2 additions & 2 deletions src/librustdoc/lib.rs
Expand Up @@ -256,8 +256,8 @@ fn opts() -> Vec<RustcOptGroup> {
"additional themes which will be added to the generated docs",
"FILES")
}),
stable("theme-checker", |o| {
o.optmulti("", "theme-checker",
stable("check-theme", |o| {
o.optmulti("", "check-theme",
"check if given theme is valid",
"FILES")
}),
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rustdoc-themes/main.rs
Expand Up @@ -39,7 +39,7 @@ fn main() {
exit(1);
}
let status = Command::new(rustdoc_bin)
.args(&["-Z", "unstable-options", "--theme-checker"])
.args(&["-Z", "unstable-options", "--check-theme"])
.args(&themes)
.status()
.expect("failed to execute child");
Expand Down

0 comments on commit 8f44c60

Please sign in to comment.