[Issue 9475] New: Should retain source formatting in ddoc's unittests

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 7 16:11:04 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9475

           Summary: Should retain source formatting in ddoc's unittests
           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-02-07 16:11:02 PST ---
Code:
-------------------------------
/**
 * Main program
 */
void main() { }

/// Example
unittest
{
    foreach (i; 0 .. 10)
    {
        documentedFunction();
    }
}
-----------------------------------

Output:
-------------------------------
<br><br>
<dl><dt><big><a name="main"></a>void <u>main</u>();
</big></dt>
<dd>Main program<br><br>
<b>Example:</b><pre class="d_code"><font color=blue>foreach</font> (i; 0 .. 10)
{
documentedFunction();
}
</pre><br><br>
</dd>
</dl>
-------------------------------

Notice that the indentation of the loop body has been lost. This makes example
code have bad indentation in the generated docs.

-- 
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