summaryrefslogtreecommitdiffstats
path: root/debian/patches/prune/d-0002-mdbook-strip-embedded-libs.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/prune/d-0002-mdbook-strip-embedded-libs.patch (renamed from debian/patches/d-0002-mdbook-strip-embedded-libs.patch)164
1 files changed, 137 insertions, 27 deletions
diff --git a/debian/patches/d-0002-mdbook-strip-embedded-libs.patch b/debian/patches/prune/d-0002-mdbook-strip-embedded-libs.patch
index 6e7914c45..62d97a13f 100644
--- a/debian/patches/d-0002-mdbook-strip-embedded-libs.patch
+++ b/debian/patches/prune/d-0002-mdbook-strip-embedded-libs.patch
@@ -2,17 +2,140 @@ From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Sat, 2 Oct 2021 01:08:00 +0100
Subject: d-0002-mdbook-strip-embedded-libs
-Comment: Use https://github.com/infinity0/mdBook/tree/debian to help you rebase the patch on top of a newer version. . Make sure the paths here match the ones in debian/rust-doc.links
+Description: Use https://github.com/infinity0/mdBook/tree/debian to help you rebase
+the patch on top of a newer version. . Make sure the paths here match the ones
+in debian/rust-doc.links
+
+Forwarded: not-needed
---
+ src/doc/rust-by-example/theme/index.hbs | 86 +----------------
src/tools/linkchecker/main.rs | 28 +++++-
vendor/mdbook/src/book/init.rs | 19 ----
.../src/renderer/html_handlebars/hbs_renderer.rs | 104 ++++-----------------
.../mdbook/src/renderer/html_handlebars/search.rs | 2 -
- vendor/mdbook/src/theme/index.hbs | 99 +-------------------
+ vendor/mdbook/src/theme/index.hbs | 86 +----------------
vendor/mdbook/src/theme/mod.rs | 27 ------
vendor/mdbook/src/theme/searcher/mod.rs | 2 -
- 7 files changed, 47 insertions(+), 234 deletions(-)
+ 8 files changed, 51 insertions(+), 303 deletions(-)
+diff --git a/src/doc/rust-by-example/theme/index.hbs b/src/doc/rust-by-example/theme/index.hbs
+index 1ae579f..effac81 100644
+--- a/src/doc/rust-by-example/theme/index.hbs
++++ b/src/doc/rust-by-example/theme/index.hbs
+@@ -33,10 +33,7 @@
+ {{/if}}
+
+ <!-- Fonts -->
+- <link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css">
+- {{#if copy_fonts}}
+- <link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css">
+- {{/if}}
++ <link rel="stylesheet" href="{{ path_to_root }}css/font-awesome.min.css">
+
+ <!-- Highlight.js Stylesheets -->
+ <link rel="stylesheet" href="{{ path_to_root }}highlight.css">
+@@ -50,7 +47,7 @@
+
+ {{#if mathjax_support}}
+ <!-- MathJax -->
+- <script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
++ <script async src="MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+ {{/if}}
+ </head>
+ <body class="sidebar-visible no-js">
+@@ -61,35 +58,6 @@
+ var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
+ </script>
+
+- <!-- Work around some values being stored in localStorage wrapped in quotes -->
+- <script>
+- try {
+- var theme = localStorage.getItem('mdbook-theme');
+- var sidebar = localStorage.getItem('mdbook-sidebar');
+-
+- if (theme.startsWith('"') && theme.endsWith('"')) {
+- localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
+- }
+-
+- if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
+- localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
+- }
+- } catch (e) { }
+- </script>
+-
+- <!-- Set the theme before any content is loaded, prevents flash -->
+- <script>
+- var theme;
+- try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
+- if (theme === null || theme === undefined) { theme = default_theme; }
+- var html = document.querySelector('html');
+- html.classList.remove('{{ default_theme }}')
+- html.classList.add(theme);
+- var body = document.querySelector('body');
+- body.classList.remove('no-js')
+- body.classList.add('js');
+- </script>
+-
+ <input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
+
+ <!-- Hide / unhide sidebar before it is displayed -->
+@@ -309,54 +277,8 @@
+ </script>
+ {{/if}}
+
+- {{#if google_analytics}}
+- <!-- Google Analytics Tag -->
+- <script>
+- var localAddrs = ["localhost", "127.0.0.1", ""];
+-
+- // make sure we don't activate google analytics if the developer is
+- // inspecting the book locally...
+- if (localAddrs.indexOf(document.location.hostname) === -1) {
+- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+-
+- ga('create', '{{google_analytics}}', 'auto');
+- ga('send', 'pageview');
+- }
+- </script>
+- {{/if}}
+-
+- {{#if playground_line_numbers}}
+- <script>
+- window.playground_line_numbers = true;
+- </script>
+- {{/if}}
+-
+- {{#if playground_copyable}}
+- <script>
+- window.playground_copyable = true;
+- </script>
+- {{/if}}
+-
+- {{#if playground_js}}
+- <script src="{{ path_to_root }}ace.js"></script>
+- <script src="{{ path_to_root }}editor.js"></script>
+- <script src="{{ path_to_root }}mode-rust.js"></script>
+- <script src="{{ path_to_root }}theme-dawn.js"></script>
+- <script src="{{ path_to_root }}theme-tomorrow_night.js"></script>
+- {{/if}}
+-
+- {{#if search_js}}
+- <script src="{{ path_to_root }}elasticlunr.min.js"></script>
+- <script src="{{ path_to_root }}mark.min.js"></script>
+- <script src="{{ path_to_root }}searcher.js"></script>
+- {{/if}}
+-
+- <script src="{{ path_to_root }}clipboard.min.js"></script>
+- <script src="{{ path_to_root }}highlight.js"></script>
+- <script src="{{ path_to_root }}book.js"></script>
++ <script src="{{ path_to_root }}highlight.js" type="text/javascript" charset="utf-8"></script>
++ <script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script>
+
+ <!-- Custom JS scripts -->
+ {{#each additional_js}}
diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs
index 7f73cac..e4805cc 100644
--- a/src/tools/linkchecker/main.rs
@@ -97,7 +220,7 @@ index faca1d0..c1a82a3 100644
}
diff --git a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
-index 709aa06..17ff63c 100644
+index 8ea2f49..3cb1c9f 100644
--- a/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
+++ b/vendor/mdbook/src/renderer/html_handlebars/hbs_renderer.rs
@@ -3,13 +3,14 @@ use crate::config::{BookConfig, Code, Config, HtmlConfig, Playground, RustEditio
@@ -245,7 +368,7 @@ index 24d62fd..849a48c 100644
}
diff --git a/vendor/mdbook/src/theme/index.hbs b/vendor/mdbook/src/theme/index.hbs
-index 80315c4..48413b0 100644
+index 080b785..f6064f6 100644
--- a/vendor/mdbook/src/theme/index.hbs
+++ b/vendor/mdbook/src/theme/index.hbs
@@ -33,10 +33,7 @@
@@ -268,8 +391,8 @@ index 80315c4..48413b0 100644
+ <script async src="MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
{{/if}}
</head>
- <body>
-@@ -61,48 +58,6 @@
+ <body class="sidebar-visible no-js">
+@@ -61,35 +58,6 @@
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
</script>
@@ -295,30 +418,17 @@ index 80315c4..48413b0 100644
- try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
- if (theme === null || theme === undefined) { theme = default_theme; }
- var html = document.querySelector('html');
-- html.classList.remove('no-js')
- html.classList.remove('{{ default_theme }}')
- html.classList.add(theme);
-- html.classList.add('js');
+- var body = document.querySelector('body');
+- body.classList.remove('no-js')
+- body.classList.add('js');
- </script>
-
-- <!-- Hide / unhide sidebar before it is displayed -->
-- <script>
-- var html = document.querySelector('html');
-- var sidebar = null;
-- if (document.body.clientWidth >= 1080) {
-- try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
-- sidebar = sidebar || 'visible';
-- } else {
-- sidebar = 'hidden';
-- }
-- html.classList.remove('sidebar-visible');
-- html.classList.add("sidebar-" + sidebar);
-- </script>
--
- <nav id="sidebar" class="sidebar" aria-label="Table of contents">
- <div class="sidebar-scrollbox">
- {{#toc}}{{/toc}}
-@@ -262,54 +217,8 @@
+ <input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
+
+ <!-- Hide / unhide sidebar before it is displayed -->
+@@ -269,54 +237,8 @@
</script>
{{/if}}