summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-12-16 02:35:39 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-01-17 01:41:01 +0100
commitf42407f11401eecccda3a641a59c0a60f46b957e (patch)
treef076a24449b471d0eaba0632e27cce88b29d753b /src/librustdoc/html
parentceb2512144d1fc26330e85fb9d41c22ba1866259 (diff)
downloadrust-f42407f11401eecccda3a641a59c0a60f46b957e.tar.gz
rust-f42407f11401eecccda3a641a59c0a60f46b957e.zip
Reduce search-index.js size
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index 31e06cb1a04..2552c971794 100644
--- a/src/librustdoc/html/render.rs
+++ b/src/librustdoc/html/render.rs
@@ -1223,7 +1223,10 @@ fn write_minify_replacer<W: Write>(dst: &mut W,
                                    -> io::Result<()> {
     if enable_minification {
         writeln!(dst, "{}",
-                 minifier::js::minify_and_replace_keywords(contents, keywords_to_replace))
+                 minifier::js::minify_and_replace_keywords(contents, keywords_to_replace)
+                              .apply(minifier::js::clean_tokens)
+                              .apply(minifier::js::aggregate_strings)
+                              .to_string())
     } else {
         writeln!(dst, "{}", contents)
     }