Skip to content

Commit 82a7b6f

Browse files
Don't generate suffix for source-file.js
1 parent 1b432a6 commit 82a7b6f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/librustdoc/html/layout.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,9 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
194194
.collect::<String>(),
195195
suffix=page.resource_suffix,
196196
extra_scripts=extra_scripts.iter().map(|e| {
197-
format!("<script src=\"{root_path}{extra_script}{suffix}.js\"></script>",
197+
format!("<script src=\"{root_path}{extra_script}.js\"></script>",
198198
root_path=page.root_path,
199-
extra_script=e,
200-
suffix=page.resource_suffix)
199+
extra_script=e)
201200
}).collect::<String>(),
202201
)
203202
}

src/librustdoc/html/render.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,8 @@ impl<'a> SourceCollector<'a> {
13751375
layout::render(&mut w, &self.scx.layout,
13761376
&page, &(""), &Source(contents),
13771377
self.scx.css_file_extension.is_some(),
1378-
&self.scx.themes, &["source-files", "source-script"])?;
1378+
&self.scx.themes, &["source-files",
1379+
&format!("source-script{}", page.resource_suffix)])?;
13791380
w.flush()?;
13801381
self.scx.local_sources.insert(p.clone(), href);
13811382
Ok(())

0 commit comments

Comments
 (0)