Skip to content

Commit

Permalink
Don't generate suffix for source-file.js
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 3, 2018
1 parent 1b432a6 commit 82a7b6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/librustdoc/html/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
.collect::<String>(),
suffix=page.resource_suffix,
extra_scripts=extra_scripts.iter().map(|e| {
format!("<script src=\"{root_path}{extra_script}{suffix}.js\"></script>",
format!("<script src=\"{root_path}{extra_script}.js\"></script>",
root_path=page.root_path,
extra_script=e,
suffix=page.resource_suffix)
extra_script=e)
}).collect::<String>(),
)
}
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,8 @@ impl<'a> SourceCollector<'a> {
layout::render(&mut w, &self.scx.layout,
&page, &(""), &Source(contents),
self.scx.css_file_extension.is_some(),
&self.scx.themes, &["source-files", "source-script"])?;
&self.scx.themes, &["source-files",
&format!("source-script{}", page.resource_suffix)])?;
w.flush()?;
self.scx.local_sources.insert(p.clone(), href);
Ok(())
Expand Down

0 comments on commit 82a7b6f

Please sign in to comment.