Bug 193 – DDoc generates incorrect expansion for template decls; breaks CandyDoc

Status
RESOLVED
Resolution
WORKSFORME
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2006-06-14T02:17:00Z
Last change time
2015-06-09T05:15:24Z
Assigned to
bugzilla
Creator
someidiot

Comments

Comment #0 by someidiot — 2006-06-14T02:17:39Z
When DDoc is presented with a templated decl, it produces multiple expansions of D_PSYMBOL instead of just one. For example, using the default -D settings: class Foo(T) : Bar becomes: <dt><big>class <u><u>Foo</u></u>(T): Bar; </big></dt> The double <u> has no adverse effect in this case, but the multiple expansions can wreak havoc for other D_PSYMBOL definitions such as the one used by CandyDoc (which emit script calls, etc) In contrast, a non templated: class Foo : Bar becomes: <dt><big>class <u>Foo</u>: Bar; </big></dt>
Comment #1 by bugzilla — 2006-06-30T20:29:40Z
Fixed DMD 0.162
Comment #2 by someidiot — 2006-08-11T19:14:24Z
Hrm ... this does not appear to be fixed. There seems to be no change in the generated output, e.g. struct TextT(T) becomes: <dl><dt><big>struct <u><u>TextT</u></u>; </big></dt> Still the same double underline, due to twin expansion of D_PSYMBOL (or whatever). CandyDoc truly does not like this
Comment #3 by bugzilla — 2006-08-14T14:44:00Z
Works for me: ----------------------- C:\mars>type test.d class Bar { } /// foo struct Foo(T) { } C:\mars>dmd -D -c -o- test C:\mars>type test.html <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>struct <u>Foo</u>(T); </big></dt> <dd>foo <br><br> <dl></dl> </dd> </dl> <hr><small>Page generated by <a href="http://www.digitalmars.com/d/ddoc.html">Ddoc</a>. </small> </body></html> C:\mars> ------------------------------