Commit Graph

243 Commits

Author SHA1 Message Date
David
87a381e0a7 upgrade clap to 4.0 2022-12-14 17:11:08 -08:00
Kian-Meng Ang
cb01f11ad1 Fix typos
Found via `codespell -S ./src/theme -L crate,nam,varius,phasis`
2022-09-29 22:41:12 +08:00
Dylan DPC
66bf85b14f Require Rust 2021 edition
This allows us to clean up and simplify the code.
2022-09-09 16:00:35 +02:00
Chris Lovett
74eb4059d6
add a --chapter option to mdbook test. (#1741)
Sometimes when working on large books it is handy to be able to run mdbook on a single chapter of a book.
2022-08-25 19:13:51 -07:00
Joseph Priou
f92911b8aa
Revert "remove __non_exhaustive members, add non_exhaustive attribute instead" 2022-07-09 17:43:17 +02:00
Fauconfan
11781f0c1b remove __non_exhaustive members, add non_exhaustive attribute instead 2022-07-09 15:05:06 +02:00
ISSOtm
248863addf Fix Clippy lints
Also remove `allow(clippy::*)`s where possible
2022-06-27 23:08:45 +02:00
klensy
f3332fb0da Use serde's derive feature instead of directly importing serde_derive 2022-05-05 09:33:51 +03:00
Eric Huss
ceff050bb4 Don't try to render summary links as markdown. 2022-04-14 20:35:39 -07:00
ilslv
b73d02fb8c Remove colon to satisfy msrv 2022-02-11 12:50:22 +03:00
ilslv
6c4974b5c6 Fmt 2022-02-11 12:42:54 +03:00
ilslv
81d661c4f1 Fix no initial title consuming events. 2022-02-11 12:33:22 +03:00
Guillaume Gomez
ddb0d2396f Update pulldown-cmark version 2021-12-25 13:46:27 +01:00
Eric Huss
c3ff4a5129 Deprecate google-analytics. 2021-10-24 11:43:37 -07:00
Eric Huss
4d20fa578b
Merge pull request #1642 from ehuss/stabilize-2021
Stabilize 2021 flag.
2021-10-24 10:30:55 -07:00
ISSOtm
6b790b83ec Warn when preproc order references unknown preprocs 2021-09-28 09:25:17 +02:00
ISSOtm
d8ad68c947 Produce an error if before or after field is not a table 2021-09-27 21:28:21 +02:00
ISSOtm
6b784be616 Stabilize ties in preproc order through name sort 2021-09-27 21:28:01 +02:00
ISSOtm
9c34e602bd Allow specifying preprocessor order
Fixes #1172
2021-09-26 20:55:02 +02:00
Eric Huss
6be81214b1 Stabilize 2021 flag. 2021-09-03 11:00:27 -07:00
Ben Armstead
1700783594 Format better and remove unnecessary borrows 2021-08-24 08:45:06 +01:00
josh rotenberg
b87c231fc3 first pass at 2021 support 2021-07-04 14:44:23 -07:00
josh rotenberg
b59aab56f2 Revert "book: use non_exhaustive attribute for struct Book"
This reverts commit c1b2bec7d7.
2021-06-08 12:46:27 -07:00
Riccardo Magliocchetti
56ceb627b8 book: simplify is_draft_chapter
As suggested by clippy:
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
2021-05-30 19:33:46 +02:00
Riccardo Magliocchetti
c1b2bec7d7 book: use non_exhaustive attribute for struct Book
As suggested by clippy:
https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive
2021-05-30 19:33:46 +02:00
Andrea Gelmini
b364e8ea2c
Fix typos (#1540)
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-05-21 12:56:32 +02:00
Eric Huss
84b3b7218e
Merge pull request #1437 from rust-lang-ja/summary-with-html-comments
Skip HTML nodes in SUMMARY.md
2021-05-04 07:26:03 -07:00
Flavio Castelli
7aff98a859
Fix generation of edit links
The `IndexPreprocessor` rewrites the path for files
named `README.md` to be `index.md`. This breaks the edit link
in some circumstances.

To address this issues, the `Chapter` struct has now a new attribute
called `source_path`. This is initialized with the same value as
`path`, but is never ever changed.

Finally, the edit link is built by using the `source_path` rather
than the `path`.
2021-04-19 18:58:15 +02:00
Tatsuya Kawano
30ce7e79ac Skip HTML comments in the summary
- Revert changes in parse_numbered(). They were unnecessary.
2021-04-05 18:31:11 +08:00
David Tolnay
94f7578576
Add page title override: {{#title My Title}} (#1381)
* Add page title override: {{#title My Title}}

* Document {{#title}} in guide
2021-03-24 02:36:45 +01:00
Eric Huss
cdea0f6b61 Add missing parenthesis in doc comment. 2021-01-13 14:26:14 -08:00
pierwill
e9b0be7090 Add intra-docs links to docs
Also fixes some punctuation and changes some wording.
2021-01-10 14:51:30 -08:00
Tatsuya Kawano
d402a12e88 Skip HTML comments in the summary 2021-01-08 18:16:03 +08:00
Eric Huss
77e7cfd22b
Change init --theme to place theme in root. (#1432) 2021-01-07 01:29:38 +01:00
apatniv
3c97525743 Clippy lint: Remove unnecessary clone 2020-12-31 15:18:37 -05:00
Vivek Bharath Akupatni
a3d4febe3e
Provide useful feedback if user executes command in different folder (#1407)
Provides better feedback if user executes in a different folder than what is expected by mdbook

After the changes `mdbook build`
```
2020-12-19 14:27:35 [ERROR] (mdbook::utils): Error: Couldn't open SUMMARY.md in "/Users/vicky/rust/source_codes/mdbook_testing/src/src" directory
2020-12-19 14:27:35 [ERROR] (mdbook::utils):    Caused By: No such file or directory (os error 2)
```

Previously: `mdbook build`
```
2020-12-19 14:28:46 [ERROR] (mdbook::utils): Error: Couldn't open SUMMARY.md
2020-12-19 14:28:46 [ERROR] (mdbook::utils):    Caused By: No such file or directory (os error 2)
```
2020-12-27 12:45:11 -08:00
apatniv
ef993e8cc2 Run rust formmater 2020-12-05 20:27:03 -05:00
apatniv
a3a5386da0 Add more context regarding which missing file creation failed 2020-12-05 20:17:45 -05:00
Eric Huss
643d5ecc5c
Merge pull request #1285 from FrankHB/patch-1
Handled UTF-8 BOM
2020-11-10 14:02:01 -08:00
FrankHB
9e9cf49c50 Added a test.
Signed-off-by: FrankHB <frankhb1989@gmail.com>
2020-10-07 22:50:25 +08:00
FrankHB
780fb979a0 Avoided the redundant allocation.
Signed-off-by: FrankHB <frankhb1989@gmail.com>
2020-09-29 18:01:06 +08:00
Ross MacArthur
e0b247e9d6 Add config option to disable print html, css, and icon 2020-09-22 11:40:02 -07:00
Eric Huss
fd59dc73e5
Adjust wording 2020-09-06 09:11:53 -07:00
Gus Wynn
5ea8e55aea collect all test failures before failing 2020-09-03 18:36:51 -07:00
Evian-Zhang
9d5c454e47 delete '+' replacement and use cargo fmt to format 2020-08-08 15:13:22 +08:00
Evian-Zhang
60be20a783 allow space in SUMMARY.md's link destination 2020-08-03 09:49:01 +08:00
Érico Rolim
dcf9462d1e summary: turn SoftBreak events into spaces.
Summary items that had their name split into two lines ended up with the
last word of one line and the first word of the next line glued
together, since a space wasn't added.

Added test case for it.

Fixes #1218
2020-07-29 15:53:27 -03:00
FrankHB
65d9eb6f7e
Handled UTF-8 BOM
Fixed #1155 .
2020-07-25 13:02:44 +08:00
Eric Huss
4699269e49 Add SVG favicon. 2020-06-23 10:58:10 -07: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