Rollup merge of #56967 - GuillaumeGomez:regen-search-index, r=QuietMisdreavus

Replace current crate's searchIndex when regenerating

Fixes #56921.

r? @QuietMisdreavus
This commit is contained in:
kennytm 2018-12-23 00:07:43 +08:00
commit 1c76a2fd10
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C

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();