Skip to content

Commit

Permalink
fix Issue 7383 - Blank lines in code sections cause premature section…
Browse files Browse the repository at this point in the history
… termination
  • Loading branch information
WalterBright committed Jan 29, 2012
1 parent 6be191a commit 08c01a1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/doc.c
@@ -1,6 +1,6 @@


// Compiler implementation of the D programming language // Compiler implementation of the D programming language
// Copyright (c) 1999-2011 by Digital Mars // Copyright (c) 1999-2012 by Digital Mars
// All Rights Reserved // All Rights Reserved
// written by Walter Bright // written by Walter Bright
// http://www.digitalmars.com // http://www.digitalmars.com
Expand Down Expand Up @@ -227,7 +227,7 @@ void Module::gendocfile()
// Override with the ddoc macro files from the command line // Override with the ddoc macro files from the command line
for (size_t i = 0; i < global.params.ddocfiles->dim; i++) for (size_t i = 0; i < global.params.ddocfiles->dim; i++)
{ {
FileName f((char *)global.params.ddocfiles->data[i], 0); FileName f(global.params.ddocfiles->tdata()[i], 0);
File file(&f); File file(&f);
file.readv(); file.readv();
// BUG: convert file contents to UTF-8 before use // BUG: convert file contents to UTF-8 before use
Expand Down Expand Up @@ -532,7 +532,7 @@ void ScopeDsymbol::emitMemberComments(Scope *sc)
sc = sc->push(this); sc = sc->push(this);
for (size_t i = 0; i < members->dim; i++) for (size_t i = 0; i < members->dim; i++)
{ {
Dsymbol *s = (Dsymbol *)members->data[i]; Dsymbol *s = (*members)[i];
//printf("\ts = '%s'\n", s->toChars()); //printf("\ts = '%s'\n", s->toChars());
s->emitComment(sc); s->emitComment(sc);
} }
Expand Down Expand Up @@ -704,7 +704,7 @@ void EnumDeclaration::emitComment(Scope *sc)
{ {
for (size_t i = 0; i < members->dim; i++) for (size_t i = 0; i < members->dim; i++)
{ {
Dsymbol *s = (Dsymbol *)members->data[i]; Dsymbol *s = (*members)[i];
s->emitComment(sc); s->emitComment(sc);
} }
return; return;
Expand Down Expand Up @@ -962,7 +962,7 @@ void ClassDeclaration::toDocBuffer(OutBuffer *buf)
} }
int any = 0; int any = 0;
for (size_t i = 0; i < baseclasses->dim; i++) for (size_t i = 0; i < baseclasses->dim; i++)
{ BaseClass *bc = (BaseClass *)baseclasses->data[i]; { BaseClass *bc = (*baseclasses)[i];


if (bc->protection == PROTprivate) if (bc->protection == PROTprivate)
continue; continue;
Expand Down Expand Up @@ -1116,7 +1116,7 @@ void DocComment::parseSections(unsigned char *comment)
goto L1; goto L1;
if (*p == '\n') if (*p == '\n')
{ p++; { p++;
if (*p == '\n' && !summary && !namelen) if (*p == '\n' && !summary && !namelen && !inCode)
{ {
pend = p; pend = p;
p++; p++;
Expand Down

0 comments on commit 08c01a1

Please sign in to comment.