Cross referencing in Ddoc
Jacob Carlborg
doob at me.com
Mon Dec 30 02:19:08 PST 2013
On 2013-12-30 05:05, H. S. Teoh wrote:
> Not only so, even without cross-referencing, the way Ddoc currently does
> referencing *within* a module is faulty, because it does not take
> symbols declared in nested scopes into account. For example:
>
> module mymodule;
>
> /// docs here
> struct S {
> /// docs here
> void func() { ... }
> }
>
> /// docs here
> void func() { ... }
>
> Ddoc will use "func" as the identifier for *both* mymodule.func and
> mymodule.S.func, so any hyperlinks to "func" will likely point to the
> wrong overload of func (depending on declaration order).
>
> This problem is actually being exhibited on dlang.org at this very
> moment, in std.algorithm. Look for 'remove' in the navigation table at
> the top of the page, and click on it; you'll see it jumps to the wrong
> place because there's a member function called 'remove' in a struct that
> took precedence over the module-level 'remove' function. (Not to mention
> it breaks HTML compliance because it gives multiple elements the same
> ID.)
Yeah, that's another problem.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list