Skip to content

Commit 1c0e1c1

Browse files
use --static-root-path for settings.js
1 parent fcf850f commit 1c0e1c1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: src/librustdoc/html/render.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2113,7 +2113,8 @@ impl Context {
21132113
&final_file);
21142114

21152115
// Generating settings page.
2116-
let settings = Settings::new("./", &self.shared.resource_suffix);
2116+
let settings = Settings::new(self.shared.static_root_path.deref().unwrap_or("./"),
2117+
&self.shared.resource_suffix);
21172118
page.title = "Rustdoc settings";
21182119
page.description = "Settings of Rustdoc";
21192120
page.root_path = "./";

Diff for: src/test/rustdoc/static-root-path.rs

+4
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ pub struct SomeStruct;
1212
// @!matches - '"\.\./\.\./source-script\.js"'
1313
// @matches - '"\.\./\.\./source-files.js"'
1414
// @!matches - '"/cache/source-files\.js"'
15+
16+
// @has settings.html
17+
// @matches - '/cache/settings\.js'
18+
// @!matches - '\./settings\.js'

0 commit comments

Comments
 (0)