From: Debian Rust Maintainers Date: Sun, 23 Sep 2018 17:16:53 +0000 (+0100) Subject: d-no-web-dependencies-in-doc X-Git-Tag: archive/raspbian/1.29.0+dfsg1-1+rpi1~1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3e86fc543b78ab16a08cac5c23d89e0aab6079da;p=rustc.git d-no-web-dependencies-in-doc Gbp-Pq: Name d-no-web-dependencies-in-doc.patch --- diff --git a/src/doc/rust-by-example/theme/index.hbs b/src/doc/rust-by-example/theme/index.hbs index 89dfaaa45b..4f4ff78362 100644 --- a/src/doc/rust-by-example/theme/index.hbs +++ b/src/doc/rust-by-example/theme/index.hbs @@ -10,15 +10,13 @@ - - - + - + @@ -29,27 +27,10 @@ {{#if mathjax_support}} - + {{/if}} - - - - - - - - - - + {{#each additional_js}} @@ -58,20 +39,6 @@ - - - - - - @@ -134,42 +101,9 @@ - - - {{{livereload}}} - {{#if google_analytics}} - - {{/if}} - - {{#if playpens_editable}} - - - - - - {{/if}} - {{#if is_print}} {{/if}} - + diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs index 41ad4e7180..1297f9d7ee 100644 --- a/src/tools/linkchecker/main.rs +++ b/src/tools/linkchecker/main.rs @@ -180,6 +180,11 @@ fn check(cache: &mut Cache, url.starts_with("irc:") || url.starts_with("data:") { return; } + // Ignore parent URLs, so that the package installation process can + // provide a symbolic link later + if url.starts_with("../") { + return; + } let mut parts = url.splitn(2, "#"); let url = parts.next().unwrap(); let fragment = parts.next(); diff --git a/src/vendor/mdbook/src/book/init.rs b/src/vendor/mdbook/src/book/init.rs index 909b8cbf0b..9f1388e3a9 100644 --- a/src/vendor/mdbook/src/book/init.rs +++ b/src/vendor/mdbook/src/book/init.rs @@ -136,12 +136,6 @@ impl BookBuilder { let mut js = File::create(themedir.join("book.js"))?; js.write_all(theme::JS)?; - let mut highlight_css = File::create(themedir.join("highlight.css"))?; - highlight_css.write_all(theme::HIGHLIGHT_CSS)?; - - let mut highlight_js = File::create(themedir.join("highlight.js"))?; - highlight_js.write_all(theme::HIGHLIGHT_JS)?; - Ok(()) } diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs b/src/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs index fbaad5239a..7feb727f80 100644 --- a/src/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs @@ -3,7 +3,7 @@ use config::{Config, HtmlConfig, Playpen}; use errors::*; use renderer::{RenderContext, Renderer}; use renderer::html_handlebars::helpers; -use theme::{self, Theme, playpen_editor}; +use theme::{self, Theme}; use utils; use std::collections::BTreeMap; @@ -145,61 +145,8 @@ impl HtmlHandlebars { write_file(destination, "book.js", &theme.js)?; write_file(destination, "book.css", &theme.css)?; write_file(destination, "favicon.png", &theme.favicon)?; - write_file(destination, "highlight.css", &theme.highlight_css)?; write_file(destination, "tomorrow-night.css", &theme.tomorrow_night_css)?; write_file(destination, "ayu-highlight.css", &theme.ayu_highlight_css)?; - write_file(destination, "highlight.js", &theme.highlight_js)?; - write_file(destination, "clipboard.min.js", &theme.clipboard_js)?; - write_file( - destination, - "_FontAwesome/css/font-awesome.css", - theme::FONT_AWESOME, - )?; - write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.eot", - theme::FONT_AWESOME_EOT, - )?; - write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.svg", - theme::FONT_AWESOME_SVG, - )?; - write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.ttf", - theme::FONT_AWESOME_TTF, - )?; - write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.woff", - theme::FONT_AWESOME_WOFF, - )?; - write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.woff2", - theme::FONT_AWESOME_WOFF2, - )?; - write_file( - destination, - "_FontAwesome/fonts/FontAwesome.ttf", - theme::FONT_AWESOME_TTF, - )?; - - let playpen_config = &html_config.playpen; - - // Ace is a very large dependency, so only load it when requested - if playpen_config.editable && playpen_config.copy_js { - // Load the editor - write_file(destination, "editor.js", playpen_editor::JS)?; - write_file(destination, "ace.js", playpen_editor::ACE_JS)?; - write_file(destination, "mode-rust.js", playpen_editor::MODE_RUST_JS)?; - write_file(destination, "theme-dawn.js", playpen_editor::THEME_DAWN_JS)?; - write_file(destination, - "theme-tomorrow_night.js", - playpen_editor::THEME_TOMORROW_NIGHT_JS, - )?; - } Ok(()) } diff --git a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs index d49772f8b2..5986392c7e 100644 --- a/src/vendor/mdbook/src/renderer/html_handlebars/search.rs +++ b/src/vendor/mdbook/src/renderer/html_handlebars/search.rs @@ -29,8 +29,6 @@ pub fn create_files(search_config: &Search, destination: &Path, book: &Book) -> if search_config.copy_js { utils::fs::write_file(destination, "searchindex.js", index.as_bytes())?; utils::fs::write_file(destination, "searcher.js", searcher::JS)?; - utils::fs::write_file(destination, "mark.min.js", searcher::MARK_JS)?; - utils::fs::write_file(destination, "elasticlunr.min.js", searcher::ELASTICLUNR_JS)?; debug!("Copying search files ✓"); } diff --git a/src/vendor/mdbook/src/theme/index.hbs b/src/vendor/mdbook/src/theme/index.hbs index 5a9180decd..d1531dc1e3 100644 --- a/src/vendor/mdbook/src/theme/index.hbs +++ b/src/vendor/mdbook/src/theme/index.hbs @@ -12,15 +12,13 @@ - - - + - + @@ -31,47 +29,12 @@ {{#if mathjax_support}} - + {{/if}} - - - - - - -