Skip to content

Commit

Permalink
use --static-root-path for settings.js
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietMisdreavus committed Apr 15, 2019
1 parent fcf850f commit 1c0e1c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustdoc/html/render.rs
Expand Up @@ -2113,7 +2113,8 @@ impl Context {
&final_file);

// Generating settings page.
let settings = Settings::new("./", &self.shared.resource_suffix);
let settings = Settings::new(self.shared.static_root_path.deref().unwrap_or("./"),
&self.shared.resource_suffix);
page.title = "Rustdoc settings";
page.description = "Settings of Rustdoc";
page.root_path = "./";
Expand Down
4 changes: 4 additions & 0 deletions src/test/rustdoc/static-root-path.rs
Expand Up @@ -12,3 +12,7 @@ pub struct SomeStruct;
// @!matches - '"\.\./\.\./source-script\.js"'
// @matches - '"\.\./\.\./source-files.js"'
// @!matches - '"/cache/source-files\.js"'

// @has settings.html
// @matches - '/cache/settings\.js'
// @!matches - '\./settings\.js'

0 comments on commit 1c0e1c1

Please sign in to comment.