Files
docling/tests/data/html/hyperlink_06.html
Aatrey Sahay f2c03edb30 fix(html):preserve fragment-only anchor links during path resolution (#3262)
fix(html): preserve fragment-only anchor links during path resolution

Fragment-only hrefs (e.g. href="#section1") were resolved as filesystem
paths when source_uri was set, breaking internal document navigation.

Add '#' to the skip-resolution prefixes in _resolve_relative_path() so
fragment links pass through unchanged.

Partially addresses #2929

Signed-off-by: aatrey56 <aatrey.sahay@gmail.com>
2026-04-28 10:28:23 +02:00

12 lines
350 B
HTML
Vendored

<!doctype html>
<html lang="en">
<head><title>Anchor Links Test</title></head>
<body>
<h1>Anchor Links Test</h1>
<p>Jump to <a href="#section-2">Section 2</a> or visit
<a href="https://example.com">Example</a>.</p>
<h2 id="section-2">Section 2</h2>
<p>Content for section 2 with a <a href="#">top link</a>.</p>
</body>
</html>