Skip to content

Commit cd75fcd

Browse files
authored
Merge pull request #941 from phpDocumentor/backport/1.x/pr-933
[1.x] [FEATURE] Support Parsed Literal Block
2 parents 80d7952 + 5ebc2d8 commit cd75fcd

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

packages/guides-restructured-text/src/RestructuredText/Directives/CodeBlockDirective.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function getName(): string
4949
/** {@inheritDoc} */
5050
public function getAliases(): array
5151
{
52-
return ['code'];
52+
return ['code', 'parsed-literal'];
5353
}
5454

5555
/** {@inheritDoc} */
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!-- content start -->
2+
<div class="section" id="title">
3+
<h1>Title</h1>
4+
5+
<pre><code class="language-">// Define a custom HTML entity for a regular space character
6+
$regularSpaceEntity = &#039;&amp;#32;&#039;;
7+
8+
// Output the regular space character using the custom HTML entity
9+
echo &quot;This is a&quot; . $regularSpaceEntity . &quot;space&quot;;</code></pre>
10+
</div>
11+
12+
<!-- content end -->
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Title
2+
=====
3+
4+
.. parsed-literal::
5+
6+
// Define a custom HTML entity for a regular space character
7+
$regularSpaceEntity = '&#32;';
8+
9+
// Output the regular space character using the custom HTML entity
10+
echo "This is a" . $regularSpaceEntity . "space";

0 commit comments

Comments
 (0)