Skip to content

Commit

Permalink
Fix Issue 9731 - Ddoc should output per-paragraph macro instead of $(…
Browse files Browse the repository at this point in the history
…DDOC_BLANKLINE)
  • Loading branch information
andralex committed Jul 4, 2017
1 parent d1173e3 commit f197169
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 26 deletions.
6 changes: 3 additions & 3 deletions src/ddmd/doc.d
Expand Up @@ -2177,10 +2177,10 @@ extern (C++) void highlightText(Scope* sc, Dsymbols* a, OutBuffer* buf, size_t o
// inserted lazily at the close quote, meaning the rest of the
// text is already OK.
}
if (!sc._module.isDocFile && !inCode && i == iLineStart && i + 1 < buf.offset) // if "\n\n"
if (!inCode && i == iLineStart && i + 1 < buf.offset) // if "\n\n"
{
immutable blankline = "$(DDOC_BLANKLINE)\n";
i = buf.insert(i, blankline);
static immutable blankline = "$(DDOC_BLANKLINE)";
i = buf.insert(i, blankline.ptr, blankline.length);
}
leadingBlank = 1;
iLineStart = i + 1;
Expand Down
3 changes: 0 additions & 3 deletions test/compilable/extra-files/ddoc2.html
Expand Up @@ -476,10 +476,8 @@ <h4>Discussion</h4>
<p class="para">
Description1
<br><br>

Description2
<br><br>

Description3


Expand All @@ -490,7 +488,6 @@ <h4>See Also</h4>
<p class="para">
Things to see also.
<br><br>

And more things.
</p>
</div>
Expand Down
6 changes: 0 additions & 6 deletions test/compilable/extra-files/ddoc3.html
Expand Up @@ -476,10 +476,8 @@ <h4>Discussion</h4>
<p class="para">
Description1
<br><br>

Description2
<br><br>

Description3


Expand All @@ -490,23 +488,19 @@ <h4>See Also</h4>
<p class="para">
Things to see also.
<br><br>

And more things <br>
'arg1, arg2, arg3' : arg1, arg2, arg3. <br>
'arg2, arg3' : arg2, arg3. <br>
'arg1' : arg1. <br>
'arg2' : arg2. <br>
'arg3' : arg3. <br>
<br><br>

Things to see also world.
<br><br>

<table> <tr><td>1</td> <td>2</td> <td>3</td> </tr>
<tr><td>4</td> <td>5</td> <td>6</td> </tr>
</table>
<br><br>


<section class="code_listing">
<div class="code_sample">
Expand Down
9 changes: 0 additions & 9 deletions test/compilable/extra-files/ddoc7555.html
Expand Up @@ -502,39 +502,30 @@ <h4>Discussion</h4>
DelimitedString
TokenString
<br><br>

DelimitedString
TokenString
<br><br>

HexString
HexString
<br><br>

HexString
HexString
<br><br>

HexString
HexString
<br><br>

HexString
HexString
<br><br>

HexString
HexString
<br><br>

HexString
HexString
<br><br>

HexString
HexString
<br><br>

HexString
HexString

Expand Down
3 changes: 0 additions & 3 deletions test/compilable/extra-files/ddoc9155.html
Expand Up @@ -532,7 +532,6 @@ <h4>Declaration</h4>
</section>
<br><br>


<section class="code_listing">
<div class="code_sample">
<div class="dlang">
Expand Down Expand Up @@ -577,7 +576,6 @@ <h4>Declaration</h4>
</section>
<br><br>


<section class="code_listing">
<div class="code_sample">
<div class="dlang">
Expand All @@ -592,7 +590,6 @@ <h4>Declaration</h4>
</section>
<br><br>


<section class="code_listing">
<div class="code_sample">
<div class="dlang">
Expand Down
4 changes: 2 additions & 2 deletions test/compilable/extra-files/ddoc9764.html
Expand Up @@ -464,8 +464,8 @@
<div class="content_wrapper">
<article class="module">
<h1 class="module_name">ddoc9764</h1>
<section id="module_content">

<section id="module_content"><br><br>
<br><br>
Check ddoc9764 document.

<section class="code_listing">
Expand Down

0 comments on commit f197169

Please sign in to comment.