mdbook/tests/testsuite/print/relative_links/expected/print.html
Eric Huss 03443f723c Add more comprehensive tests for HTML rendering
This adds a bunch of tests to better exercise the HTML rendering and to
be able to track any changes in its behavior.

This includes a new `check_all_main_files` to more conveniently check
the HTML content of every chapter in a book.
2025-09-16 14:07:54 -07:00

15 lines
No EOL
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="first-chapter"><a class="header" href="#first-chapter">First Chapter</a></h1>
<div style="break-before: page; page-break-before: always;"></div><h1 id="first-nested"><a class="header" href="#first-nested">First Nested</a></h1>
<div style="break-before: page; page-break-before: always;"></div><h1 id="testing-relative-links-for-the-print-page"><a class="header" href="#testing-relative-links-for-the-print-page">Testing relative links for the print page</a></h1>
<p>When we link to <a href="second/../first/nested.html">the first section</a>, it should work on
both the print page and the non-print page.</p>
<p>The same link should work <a href="second/../first/nested.html">with an html extension</a>.</p>
<p>A <a href="second/nested.html#some-section">fragment link</a> should work.</p>
<p>Link <a href="second/../../std/foo/bar.html">outside</a>.</p>
<p>Link <a href="second/../../std/foo/bar.html#panic">outside with anchor</a>.</p>
<p><img src="second/../images/picture.png" alt="Some image" /></p>
<p><a href="second/../first/nested.html">HTML Link</a></p>
<img src="second/../images/picture.png" alt="raw html">
<h2 id="some-section"><a class="header" href="#some-section">Some section</a></h2>
<p><a href="https://example.com/foo.html#bar">Links with scheme shouldnt be touched.</a></p>
<p><a href="second/../images/not-html?arg1&arg2#with-anchor">Non-html link</a></p>