Eric Huss
271bbba7dd
Merge pull request #2414 from notriddle/on2
...
Load the sidebar toc from a shared JS file or iframe
2024-11-02 23:56:19 +00:00
Hamir Mahal
f9add3e936
fix: formatting in src/
and tests/
directories
2024-09-21 15:56:13 -07:00
Hamir Mahal
1fd9656291
style: simplify string formatting for readability
2024-09-21 15:53:59 -07:00
Michael Howell
203685e91c
Make the sidebar work without JS
...
Uses an iframe instead. The downside of iframes comes from them
not necessarily being same-origin as the main page (particularly
with `file:///` URLs), which can cause themes to fall out of sync,
but that's not a problem here since themes don't work without JS
anyway.
2024-07-16 12:38:00 -07:00
Michael Howell
2cb5b85ab2
Load the sidebar toc from a shared JS file
...
Before this change, the Rust `unstable-book` is 88MiB.
With this change, it becomes 15MiB. Other pages might not be
as extreme, but it's expected to help any book like this.
This change is so drastic because, if every chapter has a link to
every other chapter, the result is *O*(n<sup>2</sup>) text output.
2024-07-15 18:51:32 -07:00
Eric Huss
600824bed2
Merge pull request #2308 from ehuss/pulldown_cmark-0.10
...
Update pulldown_cmark to 0.10
2024-02-05 22:21:55 +00:00
Eric Huss
42e635bb9e
Update pulldown_cmark to 0.10
2024-02-05 14:11:27 -08:00
Eric Huss
3387cf373d
Clean up test backends_receive_render_context_via_stdin
2024-02-05 09:53:50 -08:00
Eric Huss
1db52ff531
Fix search for custom heading attributes
2023-05-28 12:03:03 -07:00
Eric Huss
e3be293420
Add an integration test for heading attributes
2023-05-28 12:02:59 -07:00
Eric Huss
34e5ef22a0
Don't include empty class attribute.
2023-05-28 11:33:00 -07:00
ImUrX
c8a5adcee9
fix more mistakes
2023-05-28 10:47:14 -07:00
Eric Huss
c3155e2642
Apply clippy::match_like_matches_macro
2023-05-13 09:55:51 -07:00
Eric Huss
45a8575b95
Apply clippy::needless_borrow
2023-05-13 09:44:11 -07:00
Eric Huss
f4507aeb9b
Merge pull request #2080 from t2y/fix-copy-fonts-message
...
Fix handling of copy-fonts=true when fonts.css is overridden
2023-05-13 09:19:06 -07:00
Eric Huss
01047846a9
Don't copy the stock fonts if the user has overridden fonts.css.
...
This wasn't behaving as I was really intending.
2023-05-13 09:05:25 -07:00
Sean Poulter
b9c6b326b7
style(tests): Fixed issues reported by clippy
2023-04-03 08:36:57 -04:00
Sean Poulter
bffdb0b03d
fix(cli): init --force skips confirmation prompts
2023-04-03 03:05:24 -04:00
Eric Huss
c2d973997a
Make fonts part of the theme.
2023-01-15 11:42:46 -08:00
Will Crichton
b1ca805d2a
Fix tests
2022-11-07 14:08:31 -08: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
ISSOtm
fa5f32c7fd
Make link to first chapter active in index page
...
Makes both pages more consistent, and also the previous test pass
Co-authored-by: Eric Huss <eric@huss.org>
2022-06-29 23:51:18 +02:00
ISSOtm
a91e888575
Add test for index page
2022-06-29 08:48:49 +02:00
Matthew Woodcraft
000a93dc77
Test that long words are omitted from the search index.
...
Note they do appear in the 'docs' part of searchindex.json (so they will be
visible in search teasers).
2022-06-26 12:22:52 +01:00
Dylan DPC
a5f861bf2b
Revert "Omit words longer than 80 characters from the search index"
2022-06-22 13:31:16 +02:00
Matthew Woodcraft
00a55b35a8
Test that long words are omitted from the search index.
...
Note they do appear in the 'docs' part of searchindex.json (so they will be
visible in search teasers).
2022-05-22 14:02:54 +01:00
Clark
fe8bb38ec1
add a test: Ensure building fails if [output.html].theme
points to a non-existent directory
2022-04-28 13:13:58 +08:00
Eric Huss
ceff050bb4
Don't try to render summary links as markdown.
2022-04-14 20:35:39 -07:00
Sergei Trofimovich
2a2b51c8ab
tests/cli: ignore user's RUST_LOG= environment variable in tests
...
nixpkgs build system sets `RUST_LOG=` (empty value) by default.
This switches `mdBook` into warnings+ mode (instead of info+).
This causes the following tests to fail:
$ RUST_LOG= cargo test --test cli_tests
...
cli::test::mdbook_cli_can_correctly_test_a_passing_book
cli::test::mdbook_cli_detects_book_with_failing_tests
cli::build::mdbook_cli_dummy_book_generates_index_html
The change drops RUST_LOG= entry.
2022-04-01 08:15:18 +01:00
Eric Huss
a5fddfa468
Merge pull request #1749 from tommilligan/unique-search-anchors
...
search: fix anchor ids for duplicate headers
2022-03-28 12:44:20 -07:00
Shogo Takata
0dca4d9b9f
add tests
2022-03-26 15:34:07 +09:00
Tom Milligan
972c61fa76
search: fix anchor ids for duplicate headers
2022-02-18 16:20:05 +00:00
Michael Howell
9bede85efa
Move cli tests to their own subdir
2021-09-26 11:29:36 -07:00
Michael Howell
11b1e86187
Fix path dumps under windows
2021-09-26 11:29:36 -07:00
Michael Howell
10d30a2dc0
Add CLI tests
...
Part of #1568
2021-09-26 11:29:35 -07:00
Eric Huss
d22299d998
Merge pull request #1631 from benarmstead/master
...
Format better, remove unnecessary borrows, and update depends
2021-09-03 10:15:16 -07:00
Michael Howell
2a8af1c21d
Include chapters with no headers in the search index
2021-08-31 12:48:21 -07:00
Ben Armstead
8a82f6336a
Format with cargo correctly
2021-08-24 08:48:24 +01:00
Ben Armstead
1700783594
Format better and remove unnecessary borrows
2021-08-24 08:45:06 +01:00
josh rotenberg
60aaa7ae31
use book_config.src for edit path
...
use book_config.src for edit path
use book_config.src for edit path
fmt
concat the path, this is a url
2021-05-27 21:54:58 -07:00
Eric Huss
45d41eac5f
Fix some issues with fragment scrolling and linking.
2021-02-12 16:37:07 -08:00
Eric Huss
9b4ab72a80
Merge pull request #1418 from ehuss/relative-renderer-command
...
Fix relative paths for renderer commands.
2021-01-14 17:01:41 -08:00
Eric Huss
77e7cfd22b
Change init --theme
to place theme in root. ( #1432 )
2021-01-07 01:29:38 +01:00
Eric Huss
9a65c8ab92
Fix relative paths for renderer commands.
2020-12-30 17:46:29 -08:00
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