Bug 22803 – DDoc Reference Links to symbols generate invalid links (duplicate DOC_ROOT)

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-02-21T17:17:13Z
Last change time
2024-12-13T19:21:04Z
Keywords
ddoc
Assigned to
No Owner
Creator
Vijay Nayar
Moved to GitHub: dmd#20057 →

Comments

Comment #0 by madric — 2022-02-21T17:17:13Z
Component: DMD, DDoc OS: Ubuntu Linux 20.04.03 LTS Summary: When generating documentation via `dub build -b docs`, DDoc comments using relative links, project symbols in [square brackets], result in invalid links. These invalid links include the base document dir `/docs` twice, e.g. `/docs/docs`. Environment: DMD v2.098.1 Reproduction Steps: 1. Create a simple project with relative links, e.g.: ```d // File: source/avro/parser.d module avro.parser; class Parser { /// Builds a [Schema] using a path to a ".avsc" file. public Schema parseFile(string fileName) { } } // File: source/avro/schema.d module avro.schema; class Schema { } ``` 2. Build the project documentation via `dub build -b docs`. 3. Browse to the generated documentation for parser, e.g. `file:///home/vnayar/projects/avro-d/docs/parser.html`. 4. Navigate to the documentation for the `parseFile` method, and click on the `Schema` link. Observed Behavior: The link is invalid because it contains `/docs` twice, e.g. `file:///home/vnayar/projects/avro-d/docs/docs/schema.html#Schema` Expected Behavior: The link should only include the document root once, e.g. `file:///home/vnayar/projects/avro-d/docs/schema.html#Schema`.
Comment #1 by robert.schadek — 2024-12-13T19:21:04Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20057 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB