Skip to content

Commit

Permalink
Revert "Issue 9731: implement $(DDOC_PARAGRAPH)"
Browse files Browse the repository at this point in the history
  • Loading branch information
andralex committed Jan 26, 2015
1 parent 6b86b12 commit a7a7095
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 157 deletions.
31 changes: 1 addition & 30 deletions src/doc.c
Expand Up @@ -224,7 +224,6 @@ DDOC_PARAM_ROW = $(TR $0)\n\
DDOC_PARAM_ID = $(TD $0)\n\
DDOC_PARAM_DESC = $(TD $0)\n\
DDOC_BLANKLINE = $(BR)$(BR)\n\
DDOC_PARAGRAPH = $0\n\
\n\
DDOC_ANCHOR = <a name=\"$1\"></a>\n\
DDOC_PSYMBOL = $(U $0)\n\
Expand Down Expand Up @@ -2212,7 +2211,6 @@ void highlightText(Scope *sc, Dsymbol *s, OutBuffer *buf, size_t offset)
int leadingBlank = 1;
int inCode = 0;
int inBacktick = 0;
int inParagraph = 0;
//int inComment = 0; // in <!-- ... --> comment
size_t iCodeStart = 0; // start of code section
size_t codeIndent = 0;
Expand Down Expand Up @@ -2249,14 +2247,8 @@ void highlightText(Scope *sc, Dsymbol *s, OutBuffer *buf, size_t offset)
if (!sc->module->isDocFile &&
!inCode && i == iLineStart && i + 1 < buf->offset) // if "\n\n"
{
if (inParagraph)
{
static const char endpara[] = ")";
i = buf->insert(i, endpara, strlen(endpara));
inParagraph = 0;
}

static const char blankline[] = "$(DDOC_BLANKLINE)\n";

i = buf->insert(i, blankline, strlen(blankline));
}
leadingBlank = 1;
Expand Down Expand Up @@ -2486,15 +2478,6 @@ void highlightText(Scope *sc, Dsymbol *s, OutBuffer *buf, size_t offset)
static const char d_code[] = "$(D_CODE ";

inCode = 1;

// Code blocks end any paragraphs in progress.
if (inParagraph)
{
static const char endpara[] = ")";
i = buf->insert(i, endpara, strlen(endpara));
inParagraph = 0;
}

codeIndent = istart - iLineStart; // save indent count
i = buf->insert(i, d_code, strlen(d_code));
iCodeStart = i;
Expand All @@ -2506,14 +2489,6 @@ void highlightText(Scope *sc, Dsymbol *s, OutBuffer *buf, size_t offset)

default:
leadingBlank = 0;

if (!inCode && !inParagraph)
{
static const char para[] = "$(DDOC_PARAGRAPH ";
i = buf->insert(i, para, strlen(para)) - 1;
inParagraph = 1;
}

if (!sc->module->isDocFile &&
!inCode && isIdStart((utf8_t *)&buf->data[i]))
{
Expand Down Expand Up @@ -2566,10 +2541,6 @@ void highlightText(Scope *sc, Dsymbol *s, OutBuffer *buf, size_t offset)
if (inCode)
s->error("unmatched --- in DDoc comment");
;
if (inParagraph)
{
buf->writestring(")");
}
}

/**************************************************
Expand Down
58 changes: 0 additions & 58 deletions test/compilable/ddocparagraph.d

This file was deleted.

69 changes: 0 additions & 69 deletions test/compilable/extra-files/ddocparagraph.html

This file was deleted.

0 comments on commit a7a7095

Please sign in to comment.