Eric Huss
15c93b56ed
Add support for fragment redirects
...
This adds the ability to redirect URLs with `#` fragments. This is
useful when section headers get renamed or moved to other pages.
This works both for deleted pages and existing pages.
The implementation requires the use of JavaScript in order to manipulate
the location. (Ideally this would be handled on the server side.)
This also makes it so that deleted page redirects preserve the fragment
ID. Previously if you had a deleted page redirect, and the user went to
something like `page.html#foo`, it would redirect to `bar.html` without
the fragment. I think preserving the fragment is probably a better
behavior. If the new page doesn't have the fragment ID, then no harm is
really done. This is technically an open redirect, but I don't think
that there is too much danger with preserving a fragment ID?
2025-07-08 15:37:46 -07:00
Guillaume Gomez
f4c54178c8
Update tests
2025-06-28 00:04:02 +02:00
Krishan Mistry
7e9be8dee3
Warn on duplicate footnote definition and ignore subsequent definitions
2025-04-30 06:39:48 -07:00
Krishan Mistry
09d22e926f
Add a test for duplicate footnote definitions
2025-04-30 06:37:24 -07:00
Eric Huss
1696f5680e
Move footnote expected HTML to a separate file
...
This output is starting to get a little long, so this moves it to a
separate file to keep things a little more tidy.
2025-04-30 06:36:09 -07:00
Eric Huss
d65d2b2a8e
Migrate summary_with_markdown_formatting to BookTest
2025-04-22 21:11:54 -07:00
Eric Huss
69972080f0
Migrate check_link_target_fallback to BookTest
2025-04-22 21:11:54 -07:00
Eric Huss
5f2453e446
Migrate check_link_target_js to BookTest
2025-04-22 21:11:54 -07:00
Eric Huss
20f71af4cb
Migrate check_spacers to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
efc5ee4449
Migrate check_first_toc_level to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
14d412b279
Migrate check_second_toc_level to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
707319e004
Migrate custom fonts with filled fonts.css to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
bdd16e25fa
Migrate copy-fonts=false empty fonts.css to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
9a1f983e65
Copy copy-fonts=false no theme to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
c2c37705e7
Migrate custom fonts.css to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
5f227613aa
Migrate copy theme default fonts to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
0274ad6e87
Migrate (no theme) default fonts to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
dd27c4f8ba
Migrate theme_dir_overrides_work_correctly to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
25b9acc321
Migrate empty theme to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
10fae8596c
Migrate missing theme to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
909bd1c54e
Migrate mdbook_test_chapter_not_found to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
f324aebdec
Migrate mdbook_test_chapter to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
5a84d641cd
Migrate pass/fail mdbook test to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
0b577ebd76
Migrate chapter_settings_validation_error to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
2056c87e28
Migrate with_no_source_path to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
8bfa6462f8
Migrate can_disable_individual_chapters to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
a8660048ca
Migrate search_index_hasnt_changed_accidentally to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
cad8988f8d
Migrate book_creates_reasonable_search_index to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
3fce1151dd
Migrate first_chapter_is_copied_as_index_even_if_not_first_elem to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
d23bdaa527
Migrate edit-url-template tests to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
2f10831a80
Migrate relative_command_path to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
a38a30da1e
Migrate backends_receive_render_context_via_stdin to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
82000d917f
Migrate alternate_backend_with_arguments to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
f482aeaca3
Migrate missing_optional_backends_are_not_fatal to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
86638abea9
Migrate missing_backends_are_fatal to BookTest
2025-04-22 21:11:53 -07:00
Eric Huss
a2cf838baf
Migrate failing_alternate_backend to BookTest
2025-04-22 21:11:46 -07:00
Eric Huss
15c6f3f318
Migrate mdbook_runs_renderers to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
cb2a63ea0a
Migrate redirects_are_emitted_correctly to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
50dfa365c7
Migrate no_index_for_print_html to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
3e22a5cdad
Migrate check_correct_relative_links_in_print_page to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
5034707a73
Migrate CmdPreprocessor tests to testsuite
2025-04-22 20:50:20 -07:00
Eric Huss
d815b0cc52
Migrate ask_the_preprocessor_to_blow_up to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
fca149a52c
Migrate process_the_dummy_book to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
ba448a9dd5
Migrate mdbook_runs_preprocessors to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
aa29ef04a2
Migrate rendered_code_does_not_have_playground_stuff_in_html_when_disabled_in_config to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
20d42a53d3
Migrate rendered_code_has_playground_stuff to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
8c8f0a4dbf
Add test for smart punctuation
2025-04-22 20:50:20 -07:00
Eric Huss
6904653a82
Migrate custom_header_attributes to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
74e01ea6e3
Migrate markdown_options to BookTest
2025-04-22 20:50:20 -07:00
Eric Huss
0732cb47b9
Migrate copy_theme to BookTest
2025-04-22 20:50:20 -07:00