Bug 10519 – Stray-paren in doc-unittest code generates wrong document

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-01T01:07:00Z
Last change time
2013-07-07T09:13:46Z
Keywords
ddoc, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-07-01T01:07:59Z
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> ----
Comment #1 by k.hara.pg — 2013-07-01T01:15:42Z
Comment #2 by github-bugzilla — 2013-07-07T08:23:55Z
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