Don't generate minification variable if minification disabled
This commit is contained in:
parent
1349c84a4f
commit
b5ae4d5888
@ -1117,7 +1117,11 @@ themePicker.onblur = handleThemeButtonsBlur;
|
||||
// with rustdoc running in parallel.
|
||||
all_indexes.sort();
|
||||
let mut w = try_err!(File::create(&dst), &dst);
|
||||
try_err!(writeln!(&mut w, "var N=null,E=\"\",T=\"t\",U=\"u\",searchIndex={{}};"), &dst);
|
||||
if options.enable_minification {
|
||||
try_err!(writeln!(&mut w, "var N=null,E=\"\",T=\"t\",U=\"u\",searchIndex={{}};"), &dst);
|
||||
} else {
|
||||
try_err!(writeln!(&mut w, "var searchIndex={{}};"), &dst);
|
||||
}
|
||||
try_err!(write_minify_replacer(&mut w,
|
||||
&format!("{}\n{}", variables.join(""), all_indexes.join("\n")),
|
||||
options.enable_minification),
|
||||
|
Loading…
x
Reference in New Issue
Block a user