Navigation Menu

Skip to content

Commit

Permalink
Minify search-index in one pass
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 17, 2019
1 parent f42407f commit 2e8fd44
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/librustdoc/html/render.rs
Expand Up @@ -1057,11 +1057,11 @@ themePicker.onblur = handleThemeButtonsBlur;
all_indexes.sort();
let mut w = try_err!(File::create(&dst), &dst);
try_err!(writeln!(&mut w, "var N = null;var searchIndex = {{}};"), &dst);
for index in &all_indexes {
try_err!(write_minify_replacer(&mut w, &*index, options.enable_minification,
&[(minifier::js::Keyword::Null, "N")]),
&dst);
}
try_err!(write_minify_replacer(&mut w,
&all_indexes.join("\n"),
options.enable_minification,
&[(minifier::js::Keyword::Null, "N")]),
&dst);
try_err!(writeln!(&mut w, "initSearch(searchIndex);addSearchOptions(searchIndex);"), &dst);

if options.enable_index_page {
Expand Down

0 comments on commit 2e8fd44

Please sign in to comment.