Thread overview
[Issue 193] New: DDoc generates incorrect expansion for template decls; breaks CandyDoc
Jun 14, 2006
d-bugmail
Jul 01, 2006
d-bugmail
Aug 12, 2006
d-bugmail
Aug 14, 2006
d-bugmail
Aug 16, 2006
kris
June 14, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=193

           Summary: DDoc generates incorrect expansion for template decls;
                    breaks CandyDoc
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: someidiot@earthlink.net


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>


-- 

July 01, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=193


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from bugzilla@digitalmars.com  2006-06-30 20:29 -------
Fixed DMD 0.162


-- 

August 12, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=193


someidiot@earthlink.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Comment #2 from someidiot@earthlink.net  2006-08-11 19:14 -------
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


-- 

August 14, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=193


bugzilla@digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WORKSFORME




------- Comment #3 from bugzilla@digitalmars.com  2006-08-14 14:44 -------
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>
------------------------------


-- 

August 16, 2006
d-bugmail@puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=193
> 
> 
> bugzilla@digitalmars.com changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|REOPENED                    |RESOLVED
>          Resolution|                            |WORKSFORME
> 
> 
> 
> 
> ------- Comment #3 from bugzilla@digitalmars.com  2006-08-14 14:44 -------
> 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>



Aye, sorry ... my bad