-
-
Notifications
You must be signed in to change notification settings - Fork 15
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 #823 from phpDocumentor/task/code-block-warning
[TASK] Warn when code-block has no content
- Loading branch information
Showing
6 changed files
with
44 additions
and
18 deletions.
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
8 changes: 8 additions & 0 deletions
8
tests/Integration/tests/code/code-block-empty/expected/index.html
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,8 @@ | ||
<!-- content start --> | ||
<div class="section" id="title"> | ||
<h1>Title</h1> | ||
|
||
<p>Some paragraph.</p> | ||
</div> | ||
|
||
<!-- content end --> |
1 change: 1 addition & 0 deletions
1
tests/Integration/tests/code/code-block-empty/expected/logs/warning.log
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 @@ | ||
app.WARNING: The code-block has no content. Did you properly indent the code? |
6 changes: 6 additions & 0 deletions
6
tests/Integration/tests/code/code-block-empty/input/index.rst
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,6 @@ | ||
Title | ||
===== | ||
|
||
.. code-block:: xml | ||
Some paragraph. |
35 changes: 17 additions & 18 deletions
35
tests/Integration/tests/directives/directive-configuration-block/expected/index.html
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 |
---|---|---|
@@ -1,30 +1,29 @@ | ||
<!-- content start --> | ||
<div class="section" id="directive-tests"> | ||
<h1>Directive tests</h1> | ||
<h1>Directive tests</h1> | ||
|
||
<div class="configuration-block"> | ||
<div role="tablist" aria-label="Configuration formats" class="configuration-tabs configuration-tabs-length-2"> | ||
<button role="tab" type="button" data-language="yaml" | ||
aria-controls="configuration-block-tabpanel-523eafc9524d67db5f21ecae2362d532" aria-selected="true" | ||
data-active="true" > | ||
<span>Yaml</span> | ||
</button> | ||
<button role="tab" type="button" data-language="custom" | ||
aria-controls="configuration-block-tabpanel-a51ba27b3c76153f629592baf23834dc" aria-selected="false" | ||
tabindex="-1"> | ||
<span>CUSTOM</span> | ||
</button> | ||
<div class="configuration-block"> | ||
<div role="tablist" aria-label="Configuration formats" class="configuration-tabs configuration-tabs-length-2"> | ||
<button role="tab" type="button" data-language="yaml" | ||
aria-controls="configuration-block-tabpanel-523eafc9524d67db5f21ecae2362d532" aria-selected="true" | ||
data-active="true" > | ||
<span>Yaml</span> | ||
</button> | ||
<button role="tab" type="button" data-language="custom" | ||
aria-controls="configuration-block-tabpanel-a51ba27b3c76153f629592baf23834dc" aria-selected="false" | ||
tabindex="-1"> | ||
<span>CUSTOM</span> | ||
</button> | ||
</div> | ||
|
||
<div role="tabpanel" id="configuration-block-tabpanel-523eafc9524d67db5f21ecae2362d532" aria-label="Yaml" class="configuration-codeblock" data-language="yaml" style=""> | ||
<pre><code class="language-yaml"># app/config/services.yml</code></pre> | ||
</div> | ||
<pre><code class="language-yaml"># app/config/services.yml</code></pre> | ||
</div> | ||
<div role="tabpanel" id="configuration-block-tabpanel-a51ba27b3c76153f629592baf23834dc" aria-label="CUSTOM" class="configuration-codeblock" data-language="custom" style="display: none"> | ||
<pre><code class="language-php">// config/routes.php</code></pre> | ||
</div> | ||
<pre><code class="language-php">// config/routes.php</code></pre> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
<!-- content end --> |