www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9475] New: Should retain source formatting in ddoc's unittests

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: hsteoh quickfur.ath.cx



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: -------
Feb 07 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9475




06:42:54 PST ---
*** Issue 9472 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 08 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9475


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ddoc, pull
                 CC|                            |andrej.mitrovich gmail.com
         AssignedTo|nobody puremagic.com        |andrej.mitrovich gmail.com



06:48:06 PST ---
Partial fix: https://github.com/D-Programming-Language/dmd/pull/1641

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 08 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9475




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/96346c9e553252946bc3c7fc31cdf052672df252
Fixes Issue 9475 - Preserve code layout in unittest body when emitting ddoc.

https://github.com/D-Programming-Language/dmd/commit/80ba0391eb227337366e193986a270f3538deb07


Issue 9475 - Preserve code layout in unittest body when emitting ddoc.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 14 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9475




Hooray, seems to work now!

Are there any missing cases (why did you say it was just a "partial fix")?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 14 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9475




10:01:32 PDT ---

 Hooray, seems to work now!
 
 Are there any missing cases (why did you say it was just a "partial fix")?
It was because code was not indented properly, but this has since been fixed thanks to Kenji's indentation code which I've borrowed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 14 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9475


hsteoh quickfur.ath.cx changed:

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



Alright, then this bug is done. Closing.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 14 2013