diff --git a/packages/guides-restructured-text/src/RestructuredText/Directives/CodeBlockDirective.php b/packages/guides-restructured-text/src/RestructuredText/Directives/CodeBlockDirective.php index 89141dad4..e001e5868 100644 --- a/packages/guides-restructured-text/src/RestructuredText/Directives/CodeBlockDirective.php +++ b/packages/guides-restructured-text/src/RestructuredText/Directives/CodeBlockDirective.php @@ -49,7 +49,7 @@ public function getName(): string /** {@inheritDoc} */ public function getAliases(): array { - return ['code']; + return ['code', 'parsed-literal']; } /** {@inheritDoc} */ diff --git a/tests/Integration/tests/code/parsed-literal-block/expected/index.html b/tests/Integration/tests/code/parsed-literal-block/expected/index.html new file mode 100644 index 000000000..3246af980 --- /dev/null +++ b/tests/Integration/tests/code/parsed-literal-block/expected/index.html @@ -0,0 +1,12 @@ + +
+

Title

+ +
// Define a custom HTML entity for a regular space character
+$regularSpaceEntity = ' ';
+
+// Output the regular space character using the custom HTML entity
+echo "This is a" . $regularSpaceEntity . "space";
+
+ + diff --git a/tests/Integration/tests/code/parsed-literal-block/input/index.rst b/tests/Integration/tests/code/parsed-literal-block/input/index.rst new file mode 100644 index 000000000..49d634443 --- /dev/null +++ b/tests/Integration/tests/code/parsed-literal-block/input/index.rst @@ -0,0 +1,10 @@ +Title +===== + +.. parsed-literal:: + + // Define a custom HTML entity for a regular space character + $regularSpaceEntity = ' '; + + // Output the regular space character using the custom HTML entity + echo "This is a" . $regularSpaceEntity . "space";