[Issue 9728] New: Ddoc anchors non-unique across overloads
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 15 09:54:17 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9728
Summary: Ddoc anchors non-unique across overloads
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: hsteoh at quickfur.ath.cx
--- Comment #0 from hsteoh at quickfur.ath.cx 2013-03-15 09:54:15 PDT ---
If there are overloaded functions, the same anchor ID is generated for all
overloads, making it impossible to link to a specific one.
Example code:
/// First overload
void func() { }
/// Second overload
void func(int x) { }
/// Main
void main() {}
Ddoc output:
<html><head>
<META http-equiv="content-type" content="text/html; charset=utf-8">
<title>test</title>
</head><body>
<h1>test</h1>
<!-- Generated by Ddoc from test.d -->
<br><br>
<dl><dt><big><a name="func"></a>void <u>func</u>();
</big></dt>
<dd>First overload<br><br>
</dd>
<dt><big><a name="func"></a>void <u>func</u>(int <i>x</i>);
</big></dt>
<dd>Second overload<br><br>
</dd>
<dt><big><a name="main"></a>void <u>main</u>();
</big></dt>
<dd>Main<br><br>
</dd>
</dl>
<hr><small>Page generated by <a
href="http://dlang.org/ddoc.html">Ddoc</a>. </small>
</body></html>
--------
Note that overriding the default Ddoc macros does not help, because DDOC_ANCHOR
is only passed the function name, so there is no way to distinguish between
overloads.
Not to mention, this breaks HTML compliance (anchor names are supposed to be
unique).
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list