Skip to content

Comments

Document and use DDOC_ANCHOR for qualified anchors#179

Merged
andralex merged 3 commits intodlang:masterfrom
ntrel:qual-anchors
Nov 19, 2012
Merged

Document and use DDOC_ANCHOR for qualified anchors#179
andralex merged 3 commits intodlang:masterfrom
ntrel:qual-anchors

Conversation

@ntrel
Copy link
Contributor

@ntrel ntrel commented Oct 23, 2012

This pull request updates the website for dlang/dmd#1174 (which has now been merged).

It documents the new DDOC_ANCHOR macro, and uses it to generate qualified anchors in DRuntime & Phobos documentation in a distinct way from the existing anchors. The existing anchors from DDOC_PSYMBOL are still generated so all existing links continue to work. The new qualified anchors will have a dot prefix. (This is necessary to prevent an existing anchor #bar for a qualified symbol Foo.bar colliding with a new anchor for a top-level symbol bar).

In addition to this, non-generated links to anchors will need updating to further prevent collisions, e.g. for std.algorithm's link table.

ntrel added 3 commits November 7, 2012 14:07
The dot prefix distinguishes qualified anchors from the old
unqualifed DDOC_PSYMBOL anchors. We need to keep the latter for
backward compatibility with various links online.
@ntrel
Copy link
Contributor Author

ntrel commented Nov 7, 2012

Note that DDOC_ANCHOR already inserts anchors by default, without the leading dot. So without this pull we will still need a small update to the Jump-to javascript code to avoid getting duplicate links for each scoped symbol - e.g. Enum.member and member.

andralex added a commit that referenced this pull request Nov 19, 2012
Document and use DDOC_ANCHOR for qualified anchors
@andralex andralex merged commit cb75f57 into dlang:master Nov 19, 2012
@andralex
Copy link
Member

merged, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants