www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10519] New: Stray-paren in doc-unittest code generates wrong document

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10519

           Summary: Stray-paren in doc-unittest code generates wrong
                    document
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ddoc
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2013-07-01 01:07:59 PDT ---
The example code generates wrong html.

Code:
----
///
void foo() {}

///
unittest
{
    auto s = "1 + (2 * (3 + 1 / 2)";
    assert(!balancedParens(s, '(', ')'));
}
----


Generated 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>
$(DDOC_MODULE_MEMBERS
<dt><big><a name="foo"></a>void <u>foo</u>();
</big></dt>
<dd><b>Examples:</b><br>
<pre class="d_code">
<font color=blue>auto</font> s = <font color=red>"1 + (2 * (3 + 1 / 2)");
<font color=blue>assert</font>(!balancedParens(s, '(', ')'));
</font>
</pre><br><br>

</dd>

        <hr><small>Page generated by <a
href="http://dlang.org/ddoc.html">Ddoc</a>. </small>
        </body></html>
----

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


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-07-01 01:15:42 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2287

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



--- Comment #2 from github-bugzilla puremagic.com 2013-07-07 08:23:55 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9106a3877addceb893c005c423fafdcc7ffefdf1
fix Issue 10519 - Stray-paren in doc-unittest code generates wrong document

https://github.com/D-Programming-Language/dmd/commit/ae5ec6160fe58e6489419f9daa77bdc907ed1b80
Merge pull request #2287 from 9rnsr/fix10519

Issue 10519 - Stray-paren in doc-unittest code generates wrong document

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


Kenji Hara <k.hara.pg gmail.com> changed:

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


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