From: Rust Maintainers Date: Thu, 31 May 2018 16:25:17 +0000 (+0100) Subject: d-no-web-dependencies-in-doc X-Git-Tag: archive/raspbian/1.26.1+dfsg1-3+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=de06fafe45f795630b2ee3459b0981ac2957d6bf;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 17e336f471..365b46ede2 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 6535a4a3dd..f994a6b9e8 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 renderer::{RenderContext, Renderer}; use book::{Book, BookItem, Chapter}; use config::{Config, HtmlConfig, Playpen}; use {theme, utils}; -use theme::{playpen_editor, Theme}; +use theme::{Theme}; use errors::*; use regex::{Captures, Regex}; @@ -156,62 +156,8 @@ impl HtmlHandlebars { self.write_file(destination, "book.js", &theme.js)?; self.write_file(destination, "book.css", &theme.css)?; self.write_file(destination, "favicon.png", &theme.favicon)?; - self.write_file(destination, "highlight.css", &theme.highlight_css)?; self.write_file(destination, "tomorrow-night.css", &theme.tomorrow_night_css)?; self.write_file(destination, "ayu-highlight.css", &theme.ayu_highlight_css)?; - self.write_file(destination, "highlight.js", &theme.highlight_js)?; - self.write_file(destination, "clipboard.min.js", &theme.clipboard_js)?; - self.write_file( - destination, - "_FontAwesome/css/font-awesome.css", - theme::FONT_AWESOME, - )?; - self.write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.eot", - theme::FONT_AWESOME_EOT, - )?; - self.write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.svg", - theme::FONT_AWESOME_SVG, - )?; - self.write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.ttf", - theme::FONT_AWESOME_TTF, - )?; - self.write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.woff", - theme::FONT_AWESOME_WOFF, - )?; - self.write_file( - destination, - "_FontAwesome/fonts/fontawesome-webfont.woff2", - theme::FONT_AWESOME_WOFF2, - )?; - self.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 { - // Load the editor - let editor = playpen_editor::PlaypenEditor::new(&playpen_config.editor); - self.write_file(destination, "editor.js", &editor.js)?; - self.write_file(destination, "ace.js", &editor.ace_js)?; - self.write_file(destination, "mode-rust.js", &editor.mode_rust_js)?; - self.write_file(destination, "theme-dawn.js", &editor.theme_dawn_js)?; - self.write_file(destination, - "theme-tomorrow_night.js", - &editor.theme_tomorrow_night_js, - )?; - } Ok(()) } diff --git a/src/vendor/mdbook/src/theme/index.hbs b/src/vendor/mdbook/src/theme/index.hbs index 2c15f38e19..c4b761a547 100644 --- a/src/vendor/mdbook/src/theme/index.hbs +++ b/src/vendor/mdbook/src/theme/index.hbs @@ -11,15 +11,13 @@ - - - + - + @@ -30,53 +28,12 @@ {{#if mathjax_support}} - + {{/if}} - - - - - - - - - - - -