Thread overview
[Issue 7383] New: Blank lines in code sections cause premature section termination
Jan 29, 2012
yebblies
Jan 29, 2012
Walter Bright
January 28, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7383

           Summary: Blank lines in code sections cause premature section
                    termination
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ddoc
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: siegelords_abode@yahoo.com


--- Comment #0 from siegelords_abode@yahoo.com 2012-01-27 22:40:10 PST ---
Test case (compile it with dmd -D):

/**
---
foo;

foo;
---
 */
void test(); // 2x test.d(8): Error: function test.test unmatched --- in DDoc
comment

/**
---

foo;
---
 */
void test2(); // 2x test.d(16): Error: function test.test2 unmatched --- in
DDoc comment

/**
foo

---

foo;
---
 */
void test3(); // OK

void main() {}

I think I tracked this bug down to line 1119 in doc.c:

if (*p == '\n' && !summary && !namelen)

If I change it to this:

if (*p == '\n' && !summary && !namelen && !inCode)

It compiles the codes above and generates fine HTML. I honestly find the doc.c code impenetrable, so I don't know if this is the right fix. The line is for the D2 dmd, but this bug happens in D1 as well.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 29, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7383


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |yebblies@gmail.com
         AssignedTo|nobody@puremagic.com        |yebblies@gmail.com


--- Comment #1 from yebblies <yebblies@gmail.com> 2012-01-29 17:47:37 EST ---
https://github.com/D-Programming-Language/dmd/pull/654

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 29, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7383



--- Comment #3 from github-bugzilla@puremagic.com 2012-01-29 01:36:57 PST ---
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/08c01a1a2bacd701137bdb80ec2a438fd9851c0f
fix Issue 7383 - Blank lines in code sections cause premature section
termination

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 29, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7383


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


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