D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8794 - DDoc should provide qualified symbol names suitable for anchors
Summary: DDoc should provide qualified symbol names suitable for anchors
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords: ddoc
Depends on:
Blocks:
 
Reported: 2012-10-10 08:59 UTC by Nick Treleaven
Modified: 2015-06-09 05:10 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nick Treleaven 2012-10-10 08:59:55 UTC
(I looked for existing bugs but found none pertaining only to dmd/ddoc itself, hence this new one).

Currently anchor links are generated for Phobos using DDOC_PSYMBOL in std.ddoc:

DDOC_PSYMBOL = <a name="$0"></a><span class="ddoc_psymbol">$0</span>

Unfortunately there is no way to get the 'qualified' name e.g. of a member or method. Consequently there are anchor collisions such as enum EditOp.remove instead of free function remove():

http://d.puremagic.com/issues/show_bug.cgi?id=6017

DDoc should provide a way to get qualified symbol names suitable for anchor links.

I have a pull request almost ready to address this.
Comment 1 Nick Treleaven 2012-10-10 09:19:23 UTC
> I have a pull request almost ready to address this.

https://github.com/D-Programming-Language/dmd/pull/1174
Comment 2 Brad Anderson 2012-10-10 09:29:55 UTC
Here's the existing bug for this: http://d.puremagic.com/issues/show_bug.cgi?id=6017

This could be marked as a duplicate or vice versa since this has a better title.
Comment 3 Nick Treleaven 2012-10-10 09:44:03 UTC
Yes, bug #6017 is very similar. I thought my dmd pull request might need a separate issue as it is purely for dmd, whereas the other issue may need a small update to the website's std.ddoc once we have the dmd fix.
Comment 4 github-bugzilla 2012-10-21 20:19:23 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f56dc1b9fa3fab48229c277a3f3907c7c800aef7
Issue 8794 - Add DDOC_ANCHOR macro for qualified anchor links

https://github.com/D-Programming-Language/dmd/commit/563195f8d0061283cf0ed5f9454ede541fad2137
Merge pull request #1174 from ntrel/ddoc-anchor

Issue 8794 - Add DDOC_ANCHOR macro for qualified anchor links