Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4338 from quickfur/ddoc_para
Issue 9731: implement $(DDOC_PARAGRAPH)
- Loading branch information
Showing
3 changed files
with
157 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// PERMUTE_ARGS: | ||
// REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o- | ||
// POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh paragraph | ||
|
||
/** | ||
* $(DDOC_COMMENT Note: The use of a nonexistent <paragraph> tag is deliberate, | ||
* to make sure it comes from the expansion of DDOC_PARAGRAPH and not from | ||
* something else that happens to also use <p>.) | ||
* | ||
* Macros: | ||
* BR=<break> | ||
* DDOC_PARAGRAPH=<paragraph>$0</paragraph> | ||
*/ | ||
module ddocparagraph; | ||
|
||
/** | ||
* Function summary goes here. Should be in own paragraph outside any section. | ||
* | ||
* Function description goes here. Treated as first paragraph by ddoc. | ||
* | ||
* Another paragraph in function description. | ||
* Continues same paragraph. Should be within the same <paragraph> tag. | ||
* | ||
* Params: | ||
* x = Parameter description with multiple paragraphs. | ||
* | ||
* Second paragraph here. | ||
* y = Parameter description in one paragraph. | ||
* | ||
* Section: | ||
* Single paragraph within section. | ||
* | ||
* Blank_section_should_have_no_paragraph_tags: | ||
* | ||
* Section_with_multiple_paragraphs: | ||
* First paragraph. | ||
* | ||
* Another paragraph. | ||
* | ||
* $(B Third) paragraph that starts with a macro. | ||
* | ||
* | ||
* | ||
* | ||
* Blank lines before this should have no extraneous paragraph tags. | ||
* --- | ||
* // Code blocks end any paragraphs in progress. | ||
* | ||
* exampleCode(2, 1); // interspersed blank line | ||
* --- | ||
* Paragraph following code block without blank line. | ||
* | ||
* --- | ||
* // Code block following blank line. | ||
* --- | ||
* Paragraph following code block without blank line. | ||
*/ | ||
void exampleCode(int x, int y) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<html><head> | ||
<META http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<title>ddocparagraph</title> | ||
</head><body> | ||
<h1>ddocparagraph</h1> | ||
<paragraph><!-- Note: The use of a nonexistent <paragraph> tag is deliberate, | ||
to make sure it comes from the expansion of DDOC_PARAGRAPH and not from | ||
something else that happens to also use <p>. --> | ||
</paragraph><break><break> | ||
|
||
<dl><dt><big><a name="exampleCode"></a>void <u>exampleCode</u>(int <i>x</i>, int <i>y</i>); | ||
</big></dt> | ||
<dd><paragraph>Function summary goes here. Should be in own paragraph outside any section. | ||
</paragraph><break><break> | ||
<paragraph>Function description goes here. Treated as first paragraph by ddoc. | ||
</paragraph><break><break> | ||
|
||
<paragraph>Another paragraph in function description. | ||
Continues same paragraph. Should be within the same <paragraph> tag. | ||
|
||
</paragraph><break><break> | ||
<b>Params:</b><break> | ||
<table><tr><td>int <i>x</i></td> | ||
<td><paragraph>Parameter description with multiple paragraphs. | ||
</paragraph><break><break> | ||
|
||
<paragraph>Second paragraph here.</paragraph></td></tr> | ||
<tr><td>int <i>y</i></td> | ||
<td><paragraph>Parameter description in one paragraph.</paragraph></td></tr> | ||
</table><break> | ||
<b>Section:</b><break> | ||
<paragraph>Single paragraph within section. | ||
|
||
</paragraph><break><break> | ||
<b>Blank section should have no paragraph tags:</b><break> | ||
<break><break> | ||
<b>Section with multiple paragraphs:</b><break> | ||
<paragraph>First paragraph. | ||
</paragraph><break><break> | ||
|
||
<paragraph>Another paragraph. | ||
</paragraph><break><break> | ||
|
||
<paragraph><b>Third</b> paragraph that starts with a macro. | ||
</paragraph><break><break> | ||
|
||
<break><break> | ||
|
||
<break><break> | ||
|
||
<break><break> | ||
|
||
<paragraph>Blank lines before this should have no extraneous paragraph tags. | ||
</paragraph><pre class="d_code"><font color=green>// Code blocks end any paragraphs in progress. | ||
</font> | ||
<u>exampleCode</u>(2, 1); <font color=green>// interspersed blank line | ||
</font></pre> | ||
<paragraph>Paragraph following code block without blank line. | ||
</paragraph><break><break> | ||
|
||
<pre class="d_code"><font color=green>// Code block following blank line. | ||
</font></pre> | ||
<paragraph>Paragraph following code block without blank line.</paragraph><break><break> | ||
|
||
</dd> | ||
</dl> | ||
|
||
<hr><small>Page generated by <a href="http://dlang.org/ddoc.html">Ddoc</a>. </small> | ||
</body></html> |