mirror of
https://github.com/docling-project/docling.git
synced 2026-05-17 13:10:38 +00:00
f2c03edb30
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>
12 lines
350 B
HTML
Vendored
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>
|