Commit Graph

117 Commits

Author SHA1 Message Date
avitex 1038f0b7f5
Fix search index tests 2020-11-26 09:02:11 +11:00
Sergey Golovin 7c0ddff96a allow to serialize the "build" section 2020-11-12 19:32:32 +03:00
Camelid b77942d3c8
Rename `book-example` to `guide` (#1336)
`book-example` is a bit of a strange name given that it's not just an
example.
2020-09-23 03:16:09 +02:00
Eric Huss 9a97f0a096
Fix init creating empty `[rust]` table. (#1233) 2020-06-22 16:36:37 +02:00
Eric Huss bc23d08fa5
Rename playpen to playground. (#1241)
looks good
2020-06-22 16:34:25 +02:00
Michael-F-Bryan ebc01dbb71
Updated the test to follow our docs 2020-05-30 04:15:24 +08:00
Michael-F-Bryan 7b3e945a27
Updated the test to reflect how redirect keys should be absolute 2020-05-30 04:11:11 +08:00
Michael-F-Bryan 5907caa732
I should have used a more realistic example 2020-05-27 03:19:24 +08:00
Michael-F-Bryan 4c2318922f
Added integration tests to make sure files are redirected as intended 2020-05-27 02:43:01 +08:00
Eric Huss 6c4c3448e3
Update dependencies. (#1211)
* Removed the itertools dependency

* Removed an unused feature flag

* Stubbed out a toml_query replacement

* Update dependencies.

* Bump env_logger.

* Use warp instead of iron for http server.

Iron does not appear to be maintained anymore. warp/hyper seems to be
reasonably maintained. Unfortunately this takes a few seconds more
to compile, but shouldn't be too bad.

One benefit is that there is no longer a need for a separate websocket
port, which makes it easier to run multiple servers at once.

* Update pulldown-cmark to 0.7

* Switch from error-chain to anyhow.

* Bump MSRV to 1.39.

* Update elasticlunr-rs.

Co-authored-by: Michael Bryan <michaelfbryan@gmail.com>
2020-05-20 23:32:00 +02:00
Kim Hermansson 6b550cb4bb Make missing backends optional. 2020-04-21 15:13:14 -07:00
Eric Huss 2f59943c04 rustfmt with 1.40
Some slight changes in formatting in 1.40.
2019-12-31 16:23:25 -08:00
Dylan DPC 1f505c2b2e
Revert "Add support for Rust edition 2018 in playpens (#1086)" (#1093)
This reverts commit a7b3aa0444.
2019-11-11 13:24:13 +01:00
Gabriel Majeri a7b3aa0444 Add support for Rust edition 2018 in playpens (#1086)
* Add support for Rust edition 2018 in playpens

* Add Rust edition support to rustdoc

* Run rustfmt

* Fix enum variant reference
2019-11-11 12:42:24 +01:00
Eric Huss 21d8f394ae Fix "next chapter" spacer handling. (#1075) 2019-10-25 17:33:21 +02:00
Weihang Lo 6af6219e5b [Feature] expandable sidebar sections (ToC collapse) (#1027)
* render(toc): render expandable toc toggle

* ui(toc): js/css logic to toggle toc

* test: update rendered output css selector

* config: add `html.fold.[enable|level]`

* renderer: fold according to configs

* doc: add `output.html.fold`

* refactor: tidy fold config

- Derive default for `Fold`.
- Use `is_empty` instead of checking the length of chapters.
2019-10-19 09:56:08 +02:00
Benedikt Werner 84a2ab0dba Reapply: Move hiding of boring lines into static content (#846) (#1065)
* Move hiding of boring lines into static content (#846)

* Fix test for hidden code
2019-10-16 11:27:14 +02:00
Carol (Nichols || Goulding) ac1749ff2f Implement a `rustdoc_include` preprocessor (#1003)
* Allow underscores in the link type name

* Add some tests for include anchors

* Include parts of Rust files and hide the rest

Fixes #618.

* Increase min supported Rust version to 1.35

* Add a test for a behavior of rustdoc_include I want to depend on

At first I thought this was a bug, but then I looked at some use cases
we have in TRPL and decided this was a feature that I'd like to use.
2019-10-06 00:27:03 +02:00
Carol (Nichols || Goulding) f9f9785839
When this test fails, print out why to assist in debugging 2019-08-12 09:50:54 -04:00
Eric Huss 6199e4df79 Bump elasticlunr. 2019-07-12 09:53:11 -07:00
Eric Huss 228e99ba11 Fix even more print page links. (#963) 2019-07-01 17:52:25 +02:00
Carol (Nichols || Goulding) b83c55f7ef
Switch to the standard library's fs::read_to_string 2019-06-19 22:49:18 -04:00
Eric Huss 07830f7f11
Merge pull request #891 from integer32llc/include-before-test
Write preprocessed content to file before testing with rustdoc
2019-06-12 15:01:58 -07:00
Eric Huss 2497e77bf1 Support strikethrough and tasklists. (#952) 2019-06-12 17:02:03 +02:00
rnitta a655d5d241 Header elements wrap links (#948)
* swap hierarchy of header for that of link

* fix comment
2019-06-03 14:31:15 +02:00
lzutao 53ba0d6655 Remove 'static lifetime from static vars (#947) 2019-05-31 18:01:02 +02:00
Lzu Tao 672cf456eb Remove unnecessary ::<crate>
Find and replace with `git grep -E '\W::[a-z]'` command.
2019-05-30 23:12:33 +07:00
lzutao 8542f7f29d Transition to 2018 edition (#933)
* Transition to 2018 edition

* Update Travis CI badge in README

* Remove non-idiomatic `extern crate` lines
2019-05-25 20:50:41 +02:00
Bas Bossink e3ec751a3f Issue 703 (#929)
* Replace all occurances of altenate backend with alternative backed

Rename test for consistency of the terminology.

* Use better sed command
2019-05-19 22:16:10 +02:00
Allen df12cc55c8 Revert "Merge pull request #889 from s3bk/master" (#917)
* Revert "Merge pull request #889 from s3bk/master"

This reverts commit b30b58b565, reversing
changes made to c6220fba83.

* format tests :P
2019-05-09 20:18:28 +02:00
Eric Huss cb4a3e0711 Fix more print.html links. (#871) 2019-05-08 23:50:59 +02:00
Bas Bossink 506996808b Fix issue 832 (#841)
* Add if around stub summary creation

Check if an existing SUMMARY.md is present to prevent overwriting it
with the stub SUMMARY.md.

[#832]

* Add test for existing SUMMARY.md
2019-05-08 21:13:20 +02:00
Philipp Hansch 5163c5ab75 Don't let robots index the print.html (#844) 2019-05-08 00:32:43 +02:00
Eric Huss 8bb5426441 Fix keyboard chapter navigation for `file` urls. (#915) 2019-05-08 00:29:46 +02:00
lzutao ab7802a9a9 Fix most of clippy warnings (#914)
* Fix clippy: cast_lossless

* Fix clippy: match_ref_pats

* Fix clippy: extra_unused_lifetimes

* Fix clippy: needless_lifetimes

* Fix clippy: new_without_default

* Fix clippy: or_fun_call

* Fix clippy: should_implement_trait

* Fix clippy: redundant_closure

* Fix clippy: const_static_lifetime

* Fix clippy: redundant_pattern_matching

* Fix clippy: unused_io_amount

* Fix clippy: string_lit_as_bytes

* Fix clippy: needless_update

* Fix clippy: blacklisted_name

* Fix clippy: collapsible_if

* Fix clippy: match_wild_err_arm

* Fix clippy: single_match

* Fix clippy: useless_vec

* Fix clippy: single_char_pattern

* Fix clippy: float_cmp

* Fix clippy: approx_constant
2019-05-06 20:20:58 +02:00
Lzu Tao 0aa3a9045a cargo fmt 2019-05-05 22:00:24 +07:00
Dylan DPC 652eab6e7e
Update custom_preprocessors.rs 2019-05-03 20:32:56 +02:00
Dylan DPC 5726a8afd6
Update build_process.rs 2019-05-03 20:00:43 +02:00
Carol (Nichols || Goulding) 4abac12c04
Fix deprecation warnings for trim left/right matches 2019-03-23 08:47:10 -04:00
Carol (Nichols || Goulding) d7c7d91005
Write preprocessed content to file before testing with rustdoc
Fixes #855.
2019-03-23 08:35:44 -04:00
Steve Klabnik a481735fa2 failing test 2019-01-15 14:08:53 -05:00
Bas Bossink 3598e905aa Make failing_alternate_backend test more platform specific
Use the suggestion from @Michael-F-Bryan to make the passing_ and
failing_alternate_backend test more reliable across platforms.
2018-12-05 22:26:53 +01:00
Bas Bossink 742dbbc917 Run rustfmt. 2018-12-04 00:11:41 +01:00
Michael Bryan 132f4fd358
Fixed a bug where the tests use the wrong dummy book 2018-09-16 23:33:58 +08:00
Michael Bryan 1d72cea972
The example preprocessor works 2018-09-16 23:28:01 +08:00
Michael Bryan 1aa1194d79
We can shell out to the preprocessor 2018-09-16 23:23:03 +08:00
Michael Bryan 304234c122
The example can now tell mdbook if renderers are supported 2018-09-16 23:00:19 +08:00
Michael Bryan 729c94a7e4
Started working on a custom preprocessor 2018-09-16 22:49:52 +08:00
Michael Bryan 09667c9956
Configurable preprocessor (#658)
* The preprocessor trait now returns a modified book instead of editing in place

* A preprocessor is told which render it's running for

* Made sure preprocessors get their renderer's name

* Users can now manually specify whether a preprocessor should run for a renderer

* You can normally use default preprocessors by default

* Got my logic around the wrong way

* Fixed the `build.use-default-preprocessors` flag
2018-09-10 18:55:58 +08:00
Matt Ickstadt 1d69ccae48 Run rustfmt
using 0.8.2-stable included in rustc 1.28.0
2018-08-02 20:22:49 -05:00