Skip to content

Commit 205425b

Browse files
authored
Merge pull request #722 from PHPCSStandards/feature/generators-markdown-blank-line-after-title
Generators/Markdown: add blank line after title
2 parents 829c9da + 9780e28 commit 205425b

19 files changed

+26
-1
lines changed

src/Generators/Markdown.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected function printFooter()
9393
protected function processSniff(DOMNode $doc)
9494
{
9595
$title = $this->getTitle($doc);
96-
echo PHP_EOL."## $title".PHP_EOL;
96+
echo PHP_EOL."## $title".PHP_EOL.PHP_EOL;
9797

9898
foreach ($doc->childNodes as $node) {
9999
if ($node->nodeName === 'standard') {

tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonBlankLines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Code Comparison, blank lines
4+
45
This is a standard block.
56
<table>
67
<tr>

tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonBlockLength.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Code Comparison, block length
4+
45
This is a standard block.
56
<table>
67
<tr>

tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonEncoding.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Code Comparison, char encoding
4+
45
This is a standard block.
56
<table>
67
<tr>

tests/Core/Generators/Expectations/ExpectedOutputCodeComparisonLineLength.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Code Comparison, line length
4+
45
Ensure there is no PHP &quot;Warning: str_repeat(): Second argument has to be greater than or equal to 0&quot;.
56
Ref: squizlabs/PHP_CodeSniffer#2522
67
<table>

tests/Core/Generators/Expectations/ExpectedOutputCodeTitleLineWrapping.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Code Title, line wrapping
4+
45
This is a standard block.
56
<table>
67
<tr>

tests/Core/Generators/Expectations/ExpectedOutputCodeTitleWhitespace.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Code Title, whitespace handling
4+
45
This is a standard block.
56
<table>
67
<tr>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## lowercase title
4+
45
This is a standard block.
56

67
Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## This is a very very very very very very very very very very very long title
4+
45
This is a standard block.
56

67
Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## One Standard Block, No Code
4+
45
Documentation contains one standard block and no code comparison.
56

67
Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)

tests/Core/Generators/Expectations/ExpectedOutputStandardBlankLines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Standard Element, blank line handling
4+
45
There is a blank line at the start of this standard.
56

67
And the above blank line is also deliberate to test part of the logic.

tests/Core/Generators/Expectations/ExpectedOutputStandardEncoding.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Standard Element, handling of HTML tags
4+
45
The use of *tags* in standard descriptions is allowed and their handling should be *safeguarded*.
56
Other tags, like &lt;a href=&quot;example.com&quot;&gt;link&lt;/a&gt;, &lt;b&gt;bold&lt;/bold&gt;, &lt;script&gt;&lt;/script&gt; are not allowed and will be encoded for display when the HTML or Markdown report is used.
67

tests/Core/Generators/Expectations/ExpectedOutputStandardIndent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Standard Element, indentation should be ignored
4+
45
This line has no indentation.
56
This line has 4 spaces indentation.
67
This line has 8 spaces indentation.

tests/Core/Generators/Expectations/ExpectedOutputStandardLineWrapping.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Standard Element, line wrapping handling
4+
45
This line has to be exactly 99 chars to test part of the logic.------------------------------------
56
And this line has to be exactly 100 chars.----------------------------------------------------------
67
And here we have a line which should start wrapping as it is longer than 100 chars. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean pellentesque iaculis enim quis hendrerit. Morbi ultrices in odio pharetra commodo.

tests/Core/Generators/Expectations/ExpectedOutputStructureDocs.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## No Content
44

5+
56
## Code Comparison Only, Missing Standard Block
7+
68
<table>
79
<tr>
810
<th>Valid: Lorem ipsum dolor sit amet.</th>
@@ -23,6 +25,7 @@
2325
</table>
2426

2527
## One Standard Block, Code Comparison
28+
2629
Documentation contains one standard block and one code comparison.
2730
<table>
2831
<tr>
@@ -44,9 +47,11 @@ Documentation contains one standard block and one code comparison.
4447
</table>
4548

4649
## One Standard Block, No Code
50+
4751
Documentation contains one standard block and no code comparison.
4852

4953
## One Standard Block, Two Code Comparisons
54+
5055
Documentation contains one standard block and two code comparisons.
5156
<table>
5257
<tr>
@@ -86,10 +91,12 @@ Documentation contains one standard block and two code comparisons.
8691
</table>
8792

8893
## Two Standard Blocks, No Code
94+
8995
This is standard block one.
9096
This is standard block two.
9197

9298
## Two Standard Blocks, One Code Comparison
99+
93100
This is standard block one.
94101
<table>
95102
<tr>
@@ -112,6 +119,7 @@ This is standard block one.
112119
This is standard block two.
113120

114121
## Two Standard Blocks, Three Code Comparisons
122+
115123
This is standard block one.
116124
<table>
117125
<tr>

tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
## Code element at wrong level
44

5+
56
Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## One element correct, one element wrong level
4+
45
This is a standard block at the correct level.
56

67
Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)

tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GeneratorTest Coding Standard
22

33
## Superfluous code element
4+
45
This is a standard block.
56
<table>
67
<tr>

tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
## Unknown element
44

5+
56
Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)

0 commit comments

Comments
 (0)