Replace current crate's searchIndex when regenerating

This commit is contained in:
Guillaume Gomez 2018-12-19 00:51:37 +01:00
parent 748d354af3
commit 3d8a066fa1

View File

@ -964,7 +964,7 @@ themePicker.onblur = handleThemeButtonsBlur;
.collect::<Vec<_>>()
.join(",")));
}
all_aliases.push(format!("ALIASES['{}'] = {{{}}};", krate.name, output));
all_aliases.push(format!("ALIASES[\"{}\"] = {{{}}};", krate.name, output));
all_aliases.sort();
try_err!(writeln!(&mut w, "var ALIASES = {{}};"), &dst);
for aliases in &all_aliases {
@ -1038,7 +1038,7 @@ themePicker.onblur = handleThemeButtonsBlur;
let dst = cx.dst.join("source-files.js");
let (mut all_sources, _krates) = try_err!(collect(&dst, &krate.name, "sourcesIndex"), &dst);
all_sources.push(format!("sourcesIndex['{}'] = {};",
all_sources.push(format!("sourcesIndex[\"{}\"] = {};",
&krate.name,
hierarchy.to_json_string()));
all_sources.sort();