Fix lint error, change scrape-examples.js minify call
This commit is contained in:
parent
25323ec306
commit
55731bbc7d
3 changed files with 9 additions and 2 deletions
|
@ -417,7 +417,7 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
|
||||||
krate: krate.name.to_string(),
|
krate: krate.name.to_string(),
|
||||||
css_file_extension: extension_css,
|
css_file_extension: extension_css,
|
||||||
generate_search_filter,
|
generate_search_filter,
|
||||||
scrape_examples_extension: call_locations.len() > 0,
|
scrape_examples_extension: !call_locations.is_empty(),
|
||||||
};
|
};
|
||||||
let mut issue_tracker_base_url = None;
|
let mut issue_tracker_base_url = None;
|
||||||
let mut include_sources = true;
|
let mut include_sources = true;
|
||||||
|
|
|
@ -304,7 +304,12 @@ pub(super) fn write_shared(
|
||||||
}
|
}
|
||||||
|
|
||||||
if cx.shared.layout.scrape_examples_extension {
|
if cx.shared.layout.scrape_examples_extension {
|
||||||
write_minify("scrape-examples.js", static_files::SCRAPE_EXAMPLES_JS, cx, options)?;
|
cx.write_minify(
|
||||||
|
SharedResource::Unversioned { name: "scrape-examples.js" },
|
||||||
|
static_files::SCRAPE_EXAMPLES_JS,
|
||||||
|
options.enable_minification,
|
||||||
|
&options.emit,
|
||||||
|
)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref css) = cx.shared.layout.css_file_extension {
|
if let Some(ref css) = cx.shared.layout.css_file_extension {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* global addClass, hasClass, removeClass, onEach */
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
// Scroll code block to put the given code location in the middle of the viewer
|
// Scroll code block to put the given code location in the middle of the viewer
|
||||||
function scrollToLoc(elt, loc) {
|
function scrollToLoc(elt, loc) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue